adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test012.ksh
blobfaa3090794393682a98b9bd99ff19652cb27d235
1 echo Create table t1(f1 time, f2 time);
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 1:1:1.0 1:30:1.0
13 2:1:1.0 6:30:1.0
14 3:1:1.0 11:30:1.0
15 4:1:1.0 16:30:1.0
16 5:1:1.0 21:30:1.0
18 echo select * from t1 where time_sub(f2 interval 2 hour) = '14:30:01';
19 ---------------------------------------------------------
20 t1.f1 t1.f2
21 ---------------------------------------------------------
22 4:1:1.0 16:30:1.0
24 echo select * from t1 where time_sub(f2 interval 2 hour) <= '14:30:01';
25 ---------------------------------------------------------
26 t1.f1 t1.f2
27 ---------------------------------------------------------
28 2:1:1.0 6:30:1.0
29 3:1:1.0 11:30:1.0
30 4:1:1.0 16:30:1.0
32 echo select * from t1 where time_sub(f2 interval 2 hour) >= '14:30:01';
33 ---------------------------------------------------------
34 t1.f1 t1.f2
35 ---------------------------------------------------------
36 1:1:1.0 1:30:1.0
37 4:1:1.0 16:30:1.0
38 5:1:1.0 21:30:1.0
40 echo select * from t1 where time_sub(f2 interval 26 hour) = '14:30:01';
41 ---------------------------------------------------------
42 t1.f1 t1.f2
43 ---------------------------------------------------------
44 4:1:1.0 16:30:1.0
46 echo select * from t1 where time_sub(f2 interval 26 hour)<= '14:30:01';
47 ---------------------------------------------------------
48 t1.f1 t1.f2
49 ---------------------------------------------------------
50 2:1:1.0 6:30:1.0
51 3:1:1.0 11:30:1.0
52 4:1:1.0 16:30:1.0
54 echo select * from t1 where time_sub(f2 interval 26 hour)>= '14:30:01';
55 ---------------------------------------------------------
56 t1.f1 t1.f2
57 ---------------------------------------------------------
58 1:1:1.0 1:30:1.0
59 4:1:1.0 16:30:1.0
60 5:1:1.0 21:30:1.0
62 echo select * from t1 where time_sub(f2 interval 26 hour)!= '14:30:01';
63 ---------------------------------------------------------
64 t1.f1 t1.f2
65 ---------------------------------------------------------
66 1:1:1.0 1:30:1.0
67 2:1:1.0 6:30:1.0
68 3:1:1.0 11:30:1.0
69 5:1:1.0 21:30:1.0
71 Statement Executed