adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test006.ksh
blob0062cca5de31243132490845878f22354717d50b
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 2001/1/3
13 2001/1/1 2001/2/1
14 2001/1/1 2001/3/1
15 2001/1/1 2002/1/1
16 2001/1/1 2002/2/2
18 echo select * from t1 where date_sub(f2 interval 6 year) = '1995-03-01';
19 ---------------------------------------------------------
20 t1.f1 t1.f2
21 ---------------------------------------------------------
22 2001/1/1 2001/3/1
24 echo select * from t1 where date_sub(f2 interval 6 year) <= '1995-03-01';
25 ---------------------------------------------------------
26 t1.f1 t1.f2
27 ---------------------------------------------------------
28 2001/1/1 2001/1/3
29 2001/1/1 2001/2/1
30 2001/1/1 2001/3/1
32 echo select * from t1 where date_sub(f2 interval 6 year) >= '1995-03-01';
33 ---------------------------------------------------------
34 t1.f1 t1.f2
35 ---------------------------------------------------------
36 2001/1/1 2001/3/1
37 2001/1/1 2002/1/1
38 2001/1/1 2002/2/2
40 echo select * from t1 where date_sub(f2 interval 6 year) != '1995-03-01';
41 ---------------------------------------------------------
42 t1.f1 t1.f2
43 ---------------------------------------------------------
44 2001/1/1 2001/1/3
45 2001/1/1 2001/2/1
46 2001/1/1 2002/1/1
47 2001/1/1 2002/2/2
49 Statement Executed