core reorg
[csql.git] / test / sql / ScalarFunction / exp.test029.ksh
bloba27d2117f7dd90b4328fcfdfcb69368158dbbe07
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 1:1:1.0
15 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
16 2004/1/1 1:1:1.0 2004/2/1 1:1:1.0
17 2004/1/1 1:1:1.0 2004/3/1 1:1:1.0
18 2002/1/1 1:1:1.0 2004/3/1 1:1:1.0
20 echo select * from t1 where timestamp_diff(day,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(day,f2,f1)<=33;
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 1:1:1.0
32 2004/1/1 1:1:1.0 2004/2/1 1:1:1.0
34 echo select * from t1 where timestamp_diff(day,f2,f1) =59;
35 ---------------------------------------------------------
36 t1.f1 t1.f2
37 ---------------------------------------------------------
38 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
40 echo select * from t1 where timestamp_diff(day,f2,f1)>=59;
41 ---------------------------------------------------------
42 t1.f1 t1.f2
43 ---------------------------------------------------------
44 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
45 2004/1/1 1:1:1.0 2004/3/1 1:1:1.0
46 2002/1/1 1:1:1.0 2004/3/1 1:1:1.0
48 echo select * from t1 where timestamp_diff(day,f2,f1) =60;
49 ---------------------------------------------------------
50 t1.f1 t1.f2
51 ---------------------------------------------------------
52 2004/1/1 1:1:1.0 2004/3/1 1:1:1.0
54 echo select * from t1 where timestamp_diff(day,f2,f1)!=60;
55 ---------------------------------------------------------
56 t1.f1 t1.f2
57 ---------------------------------------------------------
58 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
59 2002/1/1 1:1:1.0 2002/2/3 1:1:1.0
60 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
61 2004/1/1 1:1:1.0 2004/2/1 1:1:1.0
62 2002/1/1 1:1:1.0 2004/3/1 1:1:1.0
64 echo select * from t1 where timestamp_diff(day,f2,f1) =790;
65 ---------------------------------------------------------
66 t1.f1 t1.f2
67 ---------------------------------------------------------
68 2002/1/1 1:1:1.0 2004/3/1 1:1:1.0
70 echo select * from t1 where timestamp_diff(day,f2,f1)!=790;
71 ---------------------------------------------------------
72 t1.f1 t1.f2
73 ---------------------------------------------------------
74 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
75 2002/1/1 1:1:1.0 2002/2/3 1:1:1.0
76 2002/1/1 1:1:1.0 2002/3/1 1:1:1.0
77 2004/1/1 1:1:1.0 2004/2/1 1:1:1.0
78 2004/1/1 1:1:1.0 2004/3/1 1:1:1.0
80 Statement Executed