adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test032.ksh
blob63dda383547a59a444e73409c9d40a3c5c86cfd6
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 Statement Executed: Rows Affected = 1
10 echo select * from t1;
11 ---------------------------------------------------------
12 t1.f1 t1.f2
13 ---------------------------------------------------------
14 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
15 2002/1/1 1:1:1.0 2002/1/1 1:1:5.0
16 2002/1/1 1:1:1.0 2002/1/1 1:5:5.0
17 2002/1/1 1:1:1.0 2002/1/1 5:5:5.0
18 2002/1/1 1:1:1.0 2002/1/3 5:5:5.0
19 2002/1/1 1:1:1.0 2002/3/3 5:5:5.0
20 2002/1/1 1:1:1.0 2004/3/1 5:5:5.0
22 echo select * from t1 where timestamp_diff(second,f1,f2) =0;
23 ---------------------------------------------------------
24 t1.f1 t1.f2
25 ---------------------------------------------------------
26 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
28 echo select * from t1 where timestamp_diff(second,f2,f1) =4;
29 ---------------------------------------------------------
30 t1.f1 t1.f2
31 ---------------------------------------------------------
32 2002/1/1 1:1:1.0 2002/1/1 1:1:5.0
34 echo select * from t1 where timestamp_diff(second,f2,f1)<=244;
35 ---------------------------------------------------------
36 t1.f1 t1.f2
37 ---------------------------------------------------------
38 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
39 2002/1/1 1:1:1.0 2002/1/1 1:1:5.0
40 2002/1/1 1:1:1.0 2002/1/1 1:5:5.0
42 echo select * from t1 where timestamp_diff(second,f2,f1) =14644;
43 ---------------------------------------------------------
44 t1.f1 t1.f2
45 ---------------------------------------------------------
46 2002/1/1 1:1:1.0 2002/1/1 5:5:5.0
48 echo select * from t1 where timestamp_diff(second,f2,f1)>=14644;
49 ---------------------------------------------------------
50 t1.f1 t1.f2
51 ---------------------------------------------------------
52 2002/1/1 1:1:1.0 2002/1/1 5:5:5.0
53 2002/1/1 1:1:1.0 2002/1/3 5:5:5.0
54 2002/1/1 1:1:1.0 2002/3/3 5:5:5.0
55 2002/1/1 1:1:1.0 2004/3/1 5:5:5.0
57 echo select * from t1 where timestamp_diff(second,f2,f1) =187444;
58 ---------------------------------------------------------
59 t1.f1 t1.f2
60 ---------------------------------------------------------
61 2002/1/1 1:1:1.0 2002/1/3 5:5:5.0
63 echo select * from t1 where timestamp_diff(second,f2,f1) =5285044;
64 ---------------------------------------------------------
65 t1.f1 t1.f2
66 ---------------------------------------------------------
67 2002/1/1 1:1:1.0 2002/3/3 5:5:5.0
69 echo select * from t1 where timestamp_diff(second,f2,f1)!=5285044;
70 ---------------------------------------------------------
71 t1.f1 t1.f2
72 ---------------------------------------------------------
73 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
74 2002/1/1 1:1:1.0 2002/1/1 1:1:5.0
75 2002/1/1 1:1:1.0 2002/1/1 1:5:5.0
76 2002/1/1 1:1:1.0 2002/1/1 5:5:5.0
77 2002/1/1 1:1:1.0 2002/1/3 5:5:5.0
78 2002/1/1 1:1:1.0 2004/3/1 5:5:5.0
80 echo select * from t1 where timestamp_diff(second,f2,f1) =68270644;
81 ---------------------------------------------------------
82 t1.f1 t1.f2
83 ---------------------------------------------------------
84 2002/1/1 1:1:1.0 2004/3/1 5:5:5.0
86 Statement Executed