adding test scripts
[csql.git] / test / sql / ScalarFunction / exp.test031.ksh
blob1865b5c78e75fb09e8da14e189762d60346a0897
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 Statement Executed: Rows Affected = 1
11 echo select * from t1;
12 ---------------------------------------------------------
13 t1.f1 t1.f2
14 ---------------------------------------------------------
15 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
16 2002/1/1 1:1:1.0 2002/1/1 1:10:1.0
17 2002/1/1 1:1:1.0 2002/1/1 5:10:1.0
18 2002/1/1 1:1:1.0 2002/2/3 5:5:1.0
19 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
20 2004/1/1 1:1:1.0 2004/2/1 5:5:1.0
21 2004/1/1 1:1:1.0 2004/3/1 5:5:1.0
22 2002/1/1 1:1:1.0 2004/3/1 5:5:1.0
24 echo select * from t1 where timestamp_diff(minute,f1,f2) =0;
25 ---------------------------------------------------------
26 t1.f1 t1.f2
27 ---------------------------------------------------------
28 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
30 echo select * from t1 where timestamp_diff(minute,f2,f1) =9;
31 ---------------------------------------------------------
32 t1.f1 t1.f2
33 ---------------------------------------------------------
34 2002/1/1 1:1:1.0 2002/1/1 1:10:1.0
36 echo select * from t1 where timestamp_diff(minute,f2,f1)<=249;
37 ---------------------------------------------------------
38 t1.f1 t1.f2
39 ---------------------------------------------------------
40 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
41 2002/1/1 1:1:1.0 2002/1/1 1:10:1.0
42 2002/1/1 1:1:1.0 2002/1/1 5:10:1.0
44 echo select * from t1 where timestamp_diff(minute,f2,f1) =85204;
45 ---------------------------------------------------------
46 t1.f1 t1.f2
47 ---------------------------------------------------------
48 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
50 echo select * from t1 where timestamp_diff(minute,f2,f1)>=85204;
51 ---------------------------------------------------------
52 t1.f1 t1.f2
53 ---------------------------------------------------------
54 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
55 2004/1/1 1:1:1.0 2004/3/1 5:5:1.0
56 2002/1/1 1:1:1.0 2004/3/1 5:5:1.0
58 echo select * from t1 where timestamp_diff(minute,f2,f1) =44884;
59 ---------------------------------------------------------
60 t1.f1 t1.f2
61 ---------------------------------------------------------
62 2004/1/1 1:1:1.0 2004/2/1 5:5:1.0
64 echo select * from t1 where timestamp_diff(minute,f2,f1) =86644;
65 ---------------------------------------------------------
66 t1.f1 t1.f2
67 ---------------------------------------------------------
68 2004/1/1 1:1:1.0 2004/3/1 5:5:1.0
70 echo select * from t1 where timestamp_diff(minute,f2,f1)!=86644;
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/1/1 1:10:1.0
76 2002/1/1 1:1:1.0 2002/1/1 5:10:1.0
77 2002/1/1 1:1:1.0 2002/2/3 5:5:1.0
78 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
79 2004/1/1 1:1:1.0 2004/2/1 5:5:1.0
80 2002/1/1 1:1:1.0 2004/3/1 5:5:1.0
82 echo select * from t1 where timestamp_diff(minute,f2,f1) =1137844;
83 ---------------------------------------------------------
84 t1.f1 t1.f2
85 ---------------------------------------------------------
86 2002/1/1 1:1:1.0 2004/3/1 5:5:1.0
88 echo select * from t1 where timestamp_diff(minute,f2,f1)!=1137844;
89 ---------------------------------------------------------
90 t1.f1 t1.f2
91 ---------------------------------------------------------
92 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
93 2002/1/1 1:1:1.0 2002/1/1 1:10:1.0
94 2002/1/1 1:1:1.0 2002/1/1 5:10:1.0
95 2002/1/1 1:1:1.0 2002/2/3 5:5:1.0
96 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
97 2004/1/1 1:1:1.0 2004/2/1 5:5:1.0
98 2004/1/1 1:1:1.0 2004/3/1 5:5:1.0
100 Statement Executed