core reorg
[csql.git] / test / sql / ScalarFunction / exp.test030.ksh
blob0d645259199517cbe1fc0523ac53bcaf9cf7f595
1 echo Create table t1(f1 timestamp, f2 timestamp);
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 Statement Executed: Rows Affected = 1
9 echo select * from t1;
10 ---------------------------------------------------------
11 t1.f1 t1.f2
12 ---------------------------------------------------------
13 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
14 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
15 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
16 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
17 2004/1/1 1:1:1.0 2004/3/1 5:1:1.0
18 2002/1/1 1:1:1.0 2004/3/1 5:1:1.0
20 echo select * from t1 where timestamp_diff(hour,f1,f2) =0;
21 ---------------------------------------------------------
22 t1.f1 t1.f2
23 ---------------------------------------------------------
24 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
26 echo select * from t1 where timestamp_diff(hour,f2,f1)<=1420;
27 ---------------------------------------------------------
28 t1.f1 t1.f2
29 ---------------------------------------------------------
30 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
31 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
32 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
33 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
35 echo select * from t1 where timestamp_diff(hour,f2,f1) =748;
36 ---------------------------------------------------------
37 t1.f1 t1.f2
38 ---------------------------------------------------------
39 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
41 echo select * from t1 where timestamp_diff(hour,f2,f1)>=748;
42 ---------------------------------------------------------
43 t1.f1 t1.f2
44 ---------------------------------------------------------
45 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
46 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
47 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
48 2004/1/1 1:1:1.0 2004/3/1 5:1:1.0
49 2002/1/1 1:1:1.0 2004/3/1 5:1:1.0
51 echo select * from t1 where timestamp_diff(hour,f2,f1) =1444;
52 ---------------------------------------------------------
53 t1.f1 t1.f2
54 ---------------------------------------------------------
55 2004/1/1 1:1:1.0 2004/3/1 5:1:1.0
57 echo select * from t1 where timestamp_diff(hour,f2,f1)!=1444;
58 ---------------------------------------------------------
59 t1.f1 t1.f2
60 ---------------------------------------------------------
61 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
62 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
63 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
64 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
65 2002/1/1 1:1:1.0 2004/3/1 5:1:1.0
67 echo select * from t1 where timestamp_diff(hour,f2,f1) =18964;
68 ---------------------------------------------------------
69 t1.f1 t1.f2
70 ---------------------------------------------------------
71 2002/1/1 1:1:1.0 2004/3/1 5:1:1.0
73 echo select * from t1 where timestamp_diff(hour,f2,f1)!=18964;
74 ---------------------------------------------------------
75 t1.f1 t1.f2
76 ---------------------------------------------------------
77 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
78 2002/1/1 1:1:1.0 2002/2/3 5:1:1.0
79 2002/1/1 1:1:1.0 2002/3/1 5:1:1.0
80 2004/1/1 1:1:1.0 2004/2/1 5:1:1.0
81 2004/1/1 1:1:1.0 2004/3/1 5:1:1.0
83 Statement Executed