adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test033.ksh
blob2d6e49c1ed5f2df67999fae04047ae0de066d27e
1 Statement Executed
2 Statement Executed: Rows Affected = 1
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 echo select * from t1;
8 ---------------------------------------------------------
9 t1.f1 t1.f2
10 ---------------------------------------------------------
11 2001/1/1 2001/1/1
12 2001/1/1 2001/2/3
13 2001/1/3 2002/3/3
14 2001/1/1 2002/1/4
15 2001/1/1 2003/4/5
17 echo select * from t1 where extract(year from '2001-01-01') = 2001;
18 ---------------------------------------------------------
19 t1.f1 t1.f2
20 ---------------------------------------------------------
21 2001/1/1 2001/1/1
22 2001/1/1 2001/2/3
23 2001/1/3 2002/3/3
24 2001/1/1 2002/1/4
25 2001/1/1 2003/4/5
27 echo select * from t1 where extract(year from f2) = 2002;
28 ---------------------------------------------------------
29 t1.f1 t1.f2
30 ---------------------------------------------------------
31 2001/1/3 2002/3/3
32 2001/1/1 2002/1/4
34 echo select * from t1 where extract(year from f2) < 2002;
35 ---------------------------------------------------------
36 t1.f1 t1.f2
37 ---------------------------------------------------------
38 2001/1/1 2001/1/1
39 2001/1/1 2001/2/3
41 echo select * from t1 where extract(year from f2)<= 2002;
42 ---------------------------------------------------------
43 t1.f1 t1.f2
44 ---------------------------------------------------------
45 2001/1/1 2001/1/1
46 2001/1/1 2001/2/3
47 2001/1/3 2002/3/3
48 2001/1/1 2002/1/4
50 echo select * from t1 where extract(year from f2) > 2002;
51 ---------------------------------------------------------
52 t1.f1 t1.f2
53 ---------------------------------------------------------
54 2001/1/1 2003/4/5
56 echo select * from t1 where extract(year from f2)>= 2002;
57 ---------------------------------------------------------
58 t1.f1 t1.f2
59 ---------------------------------------------------------
60 2001/1/3 2002/3/3
61 2001/1/1 2002/1/4
62 2001/1/1 2003/4/5
64 echo select * from t1 where extract(year from f2)!= 2002;
65 ---------------------------------------------------------
66 t1.f1 t1.f2
67 ---------------------------------------------------------
68 2001/1/1 2001/1/1
69 2001/1/1 2001/2/3
70 2001/1/1 2003/4/5
72 Statement Executed