core reorg
[csql.git] / test / sql / ScalarFunction / exp.test003.ksh
blobd8a9c609f7d08bb61725de2f7b826fdb3ec53ac1
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 2001/1/1 2005/1/1
13 2002/1/1 2006/1/1
14 2003/1/1 2007/1/1
15 2004/1/1 2009/1/1
16 2005/1/1 2010/1/1
18 echo select * from t1 where date_add(f1 interval 4 year) = '2007-01-01';
19 ---------------------------------------------------------
20 t1.f1 t1.f2
21 ---------------------------------------------------------
22 2003/1/1 2007/1/1
24 echo select * from t1 where date_add(f1 interval 4 year) = f2;
25 ---------------------------------------------------------
26 t1.f1 t1.f2
27 ---------------------------------------------------------
28 2001/1/1 2005/1/1
29 2002/1/1 2006/1/1
30 2003/1/1 2007/1/1
32 echo select * from t1 where date_add(f1 interval 4 year) <= '2007-01-01';
33 ---------------------------------------------------------
34 t1.f1 t1.f2
35 ---------------------------------------------------------
36 2001/1/1 2005/1/1
37 2002/1/1 2006/1/1
38 2003/1/1 2007/1/1
40 echo select * from t1 where date_add(f1 interval 4 year) > '2007-01-01';
41 ---------------------------------------------------------
42 t1.f1 t1.f2
43 ---------------------------------------------------------
44 2004/1/1 2009/1/1
45 2005/1/1 2010/1/1
47 Statement Executed