adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test035.ksh
blob87446ac090ab9f30a2fd2e552214685b7bedd7f6
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/1
13 2002/1/1 2001/2/1
14 2003/1/3 2002/3/2
15 2004/1/1 2002/4/2
16 2005/1/1 2003/5/3
18 echo select * from t1 where extract(day from f2) = 02;
19 ---------------------------------------------------------
20 t1.f1 t1.f2
21 ---------------------------------------------------------
22 2003/1/3 2002/3/2
23 2004/1/1 2002/4/2
25 echo select * from t1 where extract(day from f2) < 02;
26 ---------------------------------------------------------
27 t1.f1 t1.f2
28 ---------------------------------------------------------
29 2001/1/1 2001/1/1
30 2002/1/1 2001/2/1
32 echo select * from t1 where extract(day from f2)<= 02;
33 ---------------------------------------------------------
34 t1.f1 t1.f2
35 ---------------------------------------------------------
36 2001/1/1 2001/1/1
37 2002/1/1 2001/2/1
38 2003/1/3 2002/3/2
39 2004/1/1 2002/4/2
41 echo select * from t1 where extract(day from f2) > 02;
42 ---------------------------------------------------------
43 t1.f1 t1.f2
44 ---------------------------------------------------------
45 2005/1/1 2003/5/3
47 echo select * from t1 where extract(day from f2)>= 02;
48 ---------------------------------------------------------
49 t1.f1 t1.f2
50 ---------------------------------------------------------
51 2003/1/3 2002/3/2
52 2004/1/1 2002/4/2
53 2005/1/1 2003/5/3
55 echo select * from t1 where extract(day from f2)!= 02;
56 ---------------------------------------------------------
57 t1.f1 t1.f2
58 ---------------------------------------------------------
59 2001/1/1 2001/1/1
60 2002/1/1 2001/2/1
61 2005/1/1 2003/5/3
63 Statement Executed