1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
|
ij> AUTOCOMMIT OFF;
ij> -- MODULE XTS701
-- SQL Test Suite, V6.0, Interactive SQL, xts701.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION CTS1
set schema CTS1;
0 rows inserted/updated/deleted
ij> --O SELECT USER FROM HU.ECCO;
VALUES USER;
1
--------------------------------------------------------------------------------------------------------------------------------
CTS1
ij> -- RERUN if USER value does not match preceding AUTHORIZATION comment
ROLLBACK WORK;
ij> -- date_time print
-- TEST:7004 Compound char. literal in <comparison predicate>!
INSERT INTO T4
VALUES
('This is the first compound character literal.',1,NULL,NULL);
1 row inserted/updated/deleted
ij> -- PASS:7004 If 1 row inserted successfully?
INSERT INTO T4
VALUES('Second character literal.',2,NULL,NULL);
1 row inserted/updated/deleted
ij> -- PASS:7004 If 1 row inserted successfully?
INSERT INTO T4
VALUES('Third character literal.',3,NULL,NULL);
1 row inserted/updated/deleted
ij> -- PASS:7004 If 1 row inserted successfully?
SELECT NUM6
FROM T4
WHERE STR110 = 'This is the compound ' ||
'character literal.';
NUM6
-------
ij> -- PASS:7004 If 0 rows selected - no data condition?
SELECT COUNT(*)
FROM T4
WHERE STR110 <> 'This is the first compound ' ||
'character literal.';
1
-----------
2
ij> -- PASS:7004 If COUNT = 2?
SELECT NUM6
FROM T4
WHERE NUM6 = 2 AND
STR110 <= 'Second character ' || --Comments here
'literal.';
NUM6
-------
2
ij> -- PASS:7004 If NUM6 = 2?
SELECT NUM6
FROM T4
WHERE STR110 = 'Third character literal.' || --Comments here
'second fragment' ||
'third fragment.';
NUM6
-------
ij> -- PASS:7004 If 0 rows selected - no data condition?
SELECT NUM6
FROM T4
WHERE STR110 = 'First fragment' ||
'another fragment' || --Comments
'Second character literal.' || --Comments here
'fourth fragment.';
NUM6
-------
ij> -- PASS:7004 If 0 rows selected - no data condition?
SELECT NUM6
FROM T4
WHERE STR110 <= 'Second ' ||
'chara' || --Comments
'cter liter' || --Comments here
'al.' ||
' ';
NUM6
-------
2
ij> -- PASS:7004 If NUM6 = 2?
SELECT COUNT(*)
FROM T4
WHERE STR110 < 'An indifferent' || --Comments
' charac' ||
'ter literal.';
1
-----------
0
ij> -- PASS:7004 If sum of this COUNT and the next COUNT = 3?
SELECT COUNT(*)
FROM T4
WHERE STR110 >= 'An indifferent' || --Comments
' charac' ||
'ter literal.';
1
-----------
3
ij> -- PASS:7004 If sum of this COUNT and the previous COUNT = 3?
SELECT NUM6
FROM T4
WHERE STR110 = 'Second ' ||
'chara' || --Comments
'cter liter' || --Comments here
'al.' ||
' ' || --Comments
' ';
NUM6
-------
2
ij> -- PASS:7004 If NUM6 = 2?
SELECT NUM6
FROM T4
WHERE NUM6 = 2 AND STR110 < 'Second ' ||
'chara' || --Comments
'cter literal.';
NUM6
-------
ij> -- PASS:7004 If 0 rows selected - no data condition?
ROLLBACK WORK;
ij> -- END TEST >>> 7004 <<< END TEST
-- *********************************************
-- TEST:7005 Compound character literal as inserted value!
INSERT INTO T4
VALUES
('This is the first fragment of a compound character literal,' || --Comments
' and this is the second part.',11,NULL,'Compound ' ||
--Comments
'literal.');
1 row inserted/updated/deleted
ij> -- PASS:7005 If 1 row inserted successfully?
INSERT INTO T4
VALUES('This is a comp' ||
'ound character literal,' ||
' in the second table row.',12,NULL,NULL);
1 row inserted/updated/deleted
ij> -- PASS:7005 If 1 row inserted successfully?
INSERT INTO T4
VALUES('This is ' ||
'a comp' ||
'ound ' ||
'char' ||
'acter lit' || -- Comments
'eral, ' ||
-- Comments
'in the th' ||
'ird ' ||
'table ' ||
'row.',13,NULL,NULL);
1 row inserted/updated/deleted
ij> -- PASS:7005 If 1 row inserted successfully?
SELECT STR110, COL4 FROM T4 WHERE NUM6 = 11;
STR110 |COL4
-----------------------------------------------------------------------------------------------------------------------------------
This is the first fragment of a compound character literal, and this is the second part. |Compound literal.
ij> -- PASS:7005 If STR110 = 'This is the first fragment of a compound
-- character literal, and this is the second part.'?
-- PASS:7005 If COL4 = 'Compound literal.'?
SELECT STR110 FROM T4 WHERE NUM6 = 12;
STR110
--------------------------------------------------------------------------------------------------------------
This is a compound character literal, in the second table row.
ij> -- PASS:7005 If STR110 = 'This is a compound character literal, in
-- the second table row.'?
SELECT STR110
FROM T4
WHERE NUM6 = 13;
STR110
--------------------------------------------------------------------------------------------------------------
This is a compound character literal, in the third table row.
ij> -- PASS:7005 If STR110 = 'This is a compound character literal, in
-- the third table row.'?
ROLLBACK WORK;
ij> -- END TEST >>> 7005 <<< END TEST
-- *********************************************
-- TEST:7006 Compound character literal in a <select list>!
SELECT 'First fragment of a compound character literal, ' ||
--Comment1
--Comment2
'and second part.',
'This is the first fragment of a compound character literal,' || --...
' this is the second,' ||
' and this is the third part.'
--O FROM CTS1.ECCO;
FROM ECCO;
1 |2
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
First fragment of a compound character literal, and second part.|This is the first fragment of a compound character literal, this is the second, and this is the third part.
ij> -- PASS:7006 If 1st value = 'First fragment of a compound character
-- literal, and second part.'?
-- PASS:7006 If 2nd value = 'This is the first fragment of a compound
-- character literal, this is the second, and
-- this is the third part.'?
ROLLBACK WORK;
ij> -- END TEST >>> 7006 <<< END TEST
-- *********************************************
-- *************************************************////END-OF-MODULE
;
ij>
|