adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test014.ksh
blob43818ec0776039bd0703dff57ef292113f09e003
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:10:1.0
13 2:1:1.0 1:30:1.0
14 3:1:1.0 1:50:1.0
15 4:1:1.0 13:20:1.0
16 5:1:1.0 13:40:1.0
18 echo select * from t1 where time_sub(f2 interval 3000 second) = '01:00:01';
19 ---------------------------------------------------------
20 t1.f1 t1.f2
21 ---------------------------------------------------------
22 3:1:1.0 1:50:1.0
24 echo select * from t1 where time_sub(f2 interval 3000 second) <= '01:00:01';
25 ---------------------------------------------------------
26 t1.f1 t1.f2
27 ---------------------------------------------------------
28 1:1:1.0 1:10:1.0
29 2:1:1.0 1:30:1.0
30 3:1:1.0 1:50:1.0
32 echo select * from t1 where time_sub(f2 interval 3000 second) >= '01:00:01';
33 ---------------------------------------------------------
34 t1.f1 t1.f2
35 ---------------------------------------------------------
36 3:1:1.0 1:50:1.0
37 4:1:1.0 13:20:1.0
38 5:1:1.0 13:40:1.0
40 echo select * from t1 where time_sub(f2 interval 10200 second) = '23:00:01';
41 ---------------------------------------------------------
42 t1.f1 t1.f2
43 ---------------------------------------------------------
44 3:1:1.0 1:50:1.0
46 echo select * from t1 where time_sub(f2 interval 10200 second)!= '23:00:01';
47 ---------------------------------------------------------
48 t1.f1 t1.f2
49 ---------------------------------------------------------
50 1:1:1.0 1:10:1.0
51 2:1:1.0 1:30:1.0
52 4:1:1.0 13:20:1.0
53 5:1:1.0 13:40:1.0
55 echo select * from t1 where time_sub(f2 interval 10200 second)<= '23:00:01';
56 ---------------------------------------------------------
57 t1.f1 t1.f2
58 ---------------------------------------------------------
59 3:1:1.0 1:50:1.0
60 4:1:1.0 13:20:1.0
61 5:1:1.0 13:40:1.0
63 echo select * from t1 where time_sub(f2 interval 10200 second) > '23:00:01';
64 ---------------------------------------------------------
65 t1.f1 t1.f2
66 ---------------------------------------------------------
67 1:1:1.0 1:10:1.0
68 2:1:1.0 1:30:1.0
70 Statement Executed