adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test005.ksh
blob17e184b24ee6c6ac6dc69c08defd1e71211eae5c
1 echo Create table t1(f1 date, f2 date);
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 2008/1/20 2010/1/1
13 2009/4/20 2011/2/1
14 2010/2/27 2010/3/1
15 2011/2/28 2013/2/1
16 2012/2/29 2014/1/1
18 echo select * from t1 where date_add(f1 interval 2 day) = '2010-03-01';
19 ---------------------------------------------------------
20 t1.f1 t1.f2
21 ---------------------------------------------------------
22 2010/2/27 2010/3/1
24 echo select * from t1 where date_add(f1 interval 15 day) <= '2008-02-04';
25 ---------------------------------------------------------
26 t1.f1 t1.f2
27 ---------------------------------------------------------
28 2008/1/20 2010/1/1
30 echo select * from t1 where date_add(f1 interval 15 day) >= '2009-05-05';
31 ---------------------------------------------------------
32 t1.f1 t1.f2
33 ---------------------------------------------------------
34 2009/4/20 2011/2/1
35 2010/2/27 2010/3/1
36 2011/2/28 2013/2/1
37 2012/2/29 2014/1/1
39 echo select * from t1 where date_add(f1 interval 40 day) <= '2008-03-01';
40 ---------------------------------------------------------
41 t1.f1 t1.f2
42 ---------------------------------------------------------
43 2008/1/20 2010/1/1
45 echo select * from t1 where date_add(f1 interval 40 day) >= '2009-05-30';
46 ---------------------------------------------------------
47 t1.f1 t1.f2
48 ---------------------------------------------------------
49 2009/4/20 2011/2/1
50 2010/2/27 2010/3/1
51 2011/2/28 2013/2/1
52 2012/2/29 2014/1/1
54 echo select * from t1 where date_add(f1 interval 365 day) <= '2010-04-20';
55 ---------------------------------------------------------
56 t1.f1 t1.f2
57 ---------------------------------------------------------
58 2008/1/20 2010/1/1
59 2009/4/20 2011/2/1
61 echo select * from t1 where date_add(f1 interval 366 day) >= '2010-04-21';
62 ---------------------------------------------------------
63 t1.f1 t1.f2
64 ---------------------------------------------------------
65 2009/4/20 2011/2/1
66 2010/2/27 2010/3/1
67 2011/2/28 2013/2/1
68 2012/2/29 2014/1/1
70 Statement Executed