adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test022.ksh
bloba3e968c506d05b8331588dcad92d564f84f297c6
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 2010/8/1 2:1:1.0
13 2002/1/1 1:1:1.0 2010/9/1 1:1:1.0
14 2003/1/1 1:1:1.0 2010/10/1 1:1:1.0
15 2004/1/1 1:1:1.0 2010/11/1 1:1:1.0
16 2005/1/1 1:1:1.0 2010/12/1 1:1:1.0
18 echo select * from t1 where timestamp_sub(f2 interval 10 month) ='2009-12-01 01:01:01';
19 ---------------------------------------------------------
20 t1.f1 t1.f2
21 ---------------------------------------------------------
22 2003/1/1 1:1:1.0 2010/10/1 1:1:1.0
24 echo select * from t1 where timestamp_sub(f2 interval 10 month)<='2009-12-01 01:01:01';
25 ---------------------------------------------------------
26 t1.f1 t1.f2
27 ---------------------------------------------------------
28 2001/1/1 1:1:1.0 2010/8/1 2:1:1.0
29 2002/1/1 1:1:1.0 2010/9/1 1:1:1.0
30 2003/1/1 1:1:1.0 2010/10/1 1:1:1.0
32 echo select * from t1 where timestamp_sub(f2 interval 10 month) >'2009-12-01 01:01:01';
33 ---------------------------------------------------------
34 t1.f1 t1.f2
35 ---------------------------------------------------------
36 2004/1/1 1:1:1.0 2010/11/1 1:1:1.0
37 2005/1/1 1:1:1.0 2010/12/1 1:1:1.0
39 echo select * from t1 where timestamp_sub(f2 interval 10 month)!='2009-12-01 01:01:01';
40 ---------------------------------------------------------
41 t1.f1 t1.f2
42 ---------------------------------------------------------
43 2001/1/1 1:1:1.0 2010/8/1 2:1:1.0
44 2002/1/1 1:1:1.0 2010/9/1 1:1:1.0
45 2004/1/1 1:1:1.0 2010/11/1 1:1:1.0
46 2005/1/1 1:1:1.0 2010/12/1 1:1:1.0
48 echo select * from t1 where timestamp_sub(f2 interval 130 month) ='1999-12-01 01:01:01';
49 ---------------------------------------------------------
50 t1.f1 t1.f2
51 ---------------------------------------------------------
52 2003/1/1 1:1:1.0 2010/10/1 1:1:1.0
54 echo select * from t1 where timestamp_sub(f2 interval 130 month)<='1999-12-01 01:01:01';
55 ---------------------------------------------------------
56 t1.f1 t1.f2
57 ---------------------------------------------------------
58 2001/1/1 1:1:1.0 2010/8/1 2:1:1.0
59 2002/1/1 1:1:1.0 2010/9/1 1:1:1.0
60 2003/1/1 1:1:1.0 2010/10/1 1:1:1.0
62 echo select * from t1 where timestamp_sub(f2 interval 130 month) >'1999-12-01 01:01:01';
63 ---------------------------------------------------------
64 t1.f1 t1.f2
65 ---------------------------------------------------------
66 2004/1/1 1:1:1.0 2010/11/1 1:1:1.0
67 2005/1/1 1:1:1.0 2010/12/1 1:1:1.0
69 echo select * from t1 where timestamp_sub(f2 interval 130 month)!='1999-12-01 01:01:01';
70 ---------------------------------------------------------
71 t1.f1 t1.f2
72 ---------------------------------------------------------
73 2001/1/1 1:1:1.0 2010/8/1 2:1:1.0
74 2002/1/1 1:1:1.0 2010/9/1 1:1:1.0
75 2004/1/1 1:1:1.0 2010/11/1 1:1:1.0
76 2005/1/1 1:1:1.0 2010/12/1 1:1:1.0
78 Statement Executed