adding test scripts
[csql.git] / test / sql / Predicate / exp.test004.ksh
blob3e8e04d9d214bbb752bdf49f63c60eb630df36c7
1 echo Create table t1(f1 varchar(10), f2 char(10), f3 varchar(10), f4 int);
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 t1.f3 t1.f4
14 ---------------------------------------------------------
15 CSQL1 LAKS1 BBSR1 10
16 CSQL1 LAKS1 BBSR2 20
17 CSQL1 LAKS2 BBSR3 30
18 CSQL1 LAKS2 BBSR4 40
19 CSQL2 LAKS3 BBSR5 50
20 CSQL2 LAKS3 BBSR6 60
21 CSQL2 LAKS4 BBSR7 70
22 CSQL2 LAKS4 BBSR8 80
24 echo select * from t1 where f1='CSQL2';
25 ---------------------------------------------------------
26 t1.f1 t1.f2 t1.f3 t1.f4
27 ---------------------------------------------------------
28 CSQL2 LAKS3 BBSR5 50
29 CSQL2 LAKS3 BBSR6 60
30 CSQL2 LAKS4 BBSR7 70
31 CSQL2 LAKS4 BBSR8 80
33 echo select * from t1 where not(f1='CSQL2');
34 ---------------------------------------------------------
35 t1.f1 t1.f2 t1.f3 t1.f4
36 ---------------------------------------------------------
37 CSQL1 LAKS1 BBSR1 10
38 CSQL1 LAKS1 BBSR2 20
39 CSQL1 LAKS2 BBSR3 30
40 CSQL1 LAKS2 BBSR4 40
42 echo select * from t1 where f1='CSQL1' and f2='LAKS1';
43 ---------------------------------------------------------
44 t1.f1 t1.f2 t1.f3 t1.f4
45 ---------------------------------------------------------
46 CSQL1 LAKS1 BBSR1 10
47 CSQL1 LAKS1 BBSR2 20
49 echo select * from t1 where f2='LAKS1' and not(f1='CSQL2');
50 ---------------------------------------------------------
51 t1.f1 t1.f2 t1.f3 t1.f4
52 ---------------------------------------------------------
53 CSQL1 LAKS1 BBSR1 10
54 CSQL1 LAKS1 BBSR2 20
56 echo select * from t1 where f1='CSQL1' and f2='LAKS1' and f3='BBSR1';
57 ---------------------------------------------------------
58 t1.f1 t1.f2 t1.f3 t1.f4
59 ---------------------------------------------------------
60 CSQL1 LAKS1 BBSR1 10
62 echo select * from t1 where f1='CSQL1' and f2='LAKS1' and not(f3='BBSR1');
63 ---------------------------------------------------------
64 t1.f1 t1.f2 t1.f3 t1.f4
65 ---------------------------------------------------------
66 CSQL1 LAKS1 BBSR2 20
68 echo select * from t1 where f1='CSQL1' and f2='LAKS1' and not(f4=20);
69 ---------------------------------------------------------
70 t1.f1 t1.f2 t1.f3 t1.f4
71 ---------------------------------------------------------
72 CSQL1 LAKS1 BBSR1 10
74 echo select * from t1 where f1='CSQL1' and f2='LAKS1' or not(f4=20);
75 ---------------------------------------------------------
76 t1.f1 t1.f2 t1.f3 t1.f4
77 ---------------------------------------------------------
78 CSQL1 LAKS1 BBSR1 10
79 CSQL1 LAKS1 BBSR2 20
80 CSQL1 LAKS2 BBSR3 30
81 CSQL1 LAKS2 BBSR4 40
82 CSQL2 LAKS3 BBSR5 50
83 CSQL2 LAKS3 BBSR6 60
84 CSQL2 LAKS4 BBSR7 70
85 CSQL2 LAKS4 BBSR8 80
87 echo select * from t1 where f1='CSQL1' or f2='LAKS1' and not(f4=20);
88 ---------------------------------------------------------
89 t1.f1 t1.f2 t1.f3 t1.f4
90 ---------------------------------------------------------
91 CSQL1 LAKS1 BBSR1 10
92 CSQL1 LAKS1 BBSR2 20
93 CSQL1 LAKS2 BBSR3 30
94 CSQL1 LAKS2 BBSR4 40
96 Statement Executed