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