adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test019.ksh
blob95dedb4f12c30538c35577738bb9a03da148532e
1 echo Create table t1(f1 timestamp, f2 timestamp);
2 Statement Executed
3 Statement Executed: Rows Affected = 1
4 Statement Executed: Rows Affected = 1
5 Statement Executed: Rows Affected = 1
6 Statement Executed: Rows Affected = 1
7 Statement Executed: Rows Affected = 1
8 echo select * from t1;
9 ---------------------------------------------------------
10 t1.f1 t1.f2
11 ---------------------------------------------------------
12 2001/1/1 1:1:1.0 2001/1/25 1:1:1.0
13 2002/1/1 1:1:1.0 2002/2/25 1:1:1.0
14 2003/1/1 1:1:1.0 2003/2/25 1:1:1.0
15 2004/1/1 1:1:1.0 2004/2/25 1:1:1.0
16 2005/1/1 1:1:1.0 2005/11/25 1:1:1.0
18 echo select * from t1 where timestamp_add(f2 interval 244 minute) ='2003-02-25 05:05:01';
19 ---------------------------------------------------------
20 t1.f1 t1.f2
21 ---------------------------------------------------------
22 2003/1/1 1:1:1.0 2003/2/25 1:1:1.0
24 echo select * from t1 where timestamp_add(f2 interval 244 minute)<='2003-02-25 05:05:01';
25 ---------------------------------------------------------
26 t1.f1 t1.f2
27 ---------------------------------------------------------
28 2001/1/1 1:1:1.0 2001/1/25 1:1:1.0
29 2002/1/1 1:1:1.0 2002/2/25 1:1:1.0
30 2003/1/1 1:1:1.0 2003/2/25 1:1:1.0
32 echo select * from t1 where timestamp_add(f2 interval 244 minute) >'2003-02-25 05:05:01';
33 ---------------------------------------------------------
34 t1.f1 t1.f2
35 ---------------------------------------------------------
36 2004/1/1 1:1:1.0 2004/2/25 1:1:1.0
37 2005/1/1 1:1:1.0 2005/11/25 1:1:1.0
39 echo select * from t1 where timestamp_add(f2 interval 14644 minute) ='2001-02-04 05:05:01';
40 ---------------------------------------------------------
41 t1.f1 t1.f2
42 ---------------------------------------------------------
43 2001/1/1 1:1:1.0 2001/1/25 1:1:1.0
45 echo select * from t1 where timestamp_add(f2 interval 14644 minute) ='2002-03-07 05:05:01';
46 ---------------------------------------------------------
47 t1.f1 t1.f2
48 ---------------------------------------------------------
49 2002/1/1 1:1:1.0 2002/2/25 1:1:1.0
51 echo select * from t1 where timestamp_add(f2 interval 14644 minute) ='2004-03-06 05:05:01';
52 ---------------------------------------------------------
53 t1.f1 t1.f2
54 ---------------------------------------------------------
55 2004/1/1 1:1:1.0 2004/2/25 1:1:1.0
57 echo select * from t1 where timestamp_add(f2 interval 57844 minute) ='2006-01-04 05:05:01';
58 ---------------------------------------------------------
59 t1.f1 t1.f2
60 ---------------------------------------------------------
61 2005/1/1 1:1:1.0 2005/11/25 1:1:1.0
63 Statement Executed