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
|
ij> AUTOCOMMIT OFF;
ij> -- MODULE YTS811
-- SQL Test Suite, V6.0, Interactive SQL, yts811.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:7568 WHERE <search condition> referencing column!
CREATE VIEW V_DATA_TYPE AS
SELECT SUM(NUM) AS VT1, ING AS VT2, SMA AS VT3
FROM DATA_TYPE
GROUP BY ING, SMA;
0 rows inserted/updated/deleted
ij> -- PASS:7568 If view created successfully?
COMMIT WORK;
ij> --O INSERT INTO CTS1.DATA_TYPE (ING, SMA) VALUES
INSERT INTO DATA_TYPE (ING, SMA) VALUES
(1,1);
1 row inserted/updated/deleted
ij> -- PASS:7568 If 1 row inserted successfully?
--O INSERT INTO CTS1.DATA_TYPE (NUM, ING, SMA)
INSERT INTO DATA_TYPE (NUM, ING, SMA)
VALUES (2,2,3);
1 row inserted/updated/deleted
ij> -- PASS:7568 If 1 row inserted successfully?
--O INSERT INTO CTS1.DATA_TYPE (NUM, ING, SMA)
INSERT INTO DATA_TYPE (NUM, ING, SMA)
VALUES (3,4,5);
1 row inserted/updated/deleted
ij> -- PASS:7568 If 1 row inserted successfully?
--O INSERT INTO CTS1.DATA_TYPE (NUM, ING, SMA)
INSERT INTO DATA_TYPE (NUM, ING, SMA)
VALUES (2,2,3);
1 row inserted/updated/deleted
ij> -- PASS:7568 If 1 row inserted successfully?
--O INSERT INTO CTS1.DATA_TYPE (NUM, ING, SMA)
INSERT INTO DATA_TYPE (NUM, ING, SMA)
VALUES (5,4,3);
1 row inserted/updated/deleted
ij> -- PASS:7568 If 1 row inserted successfully?
SELECT VT1, VT2, VT3
FROM V_DATA_TYPE
WHERE NOT VT1 = 0
ORDER BY VT2, VT3;
VT1 |VT2 |VT3
------------------------------
4 |2 |3
WARNING 01003: Null values were eliminated from the argument of a column function.
5 |4 |3
3 |4 |5
ij> -- PASS:7568 If WARNING - null value eliminated in set function?
-- PASS:7568 If 3 rows are returned in the following order?
-- VT1 VT2 VT3
-- === === ===
-- PASS:7568 If 4 2 3 ?
-- PASS:7568 If 5 4 3 ?
-- PASS:7568 If 3 4 5 ?
SELECT VT1, VT2, VT3
FROM V_DATA_TYPE WHERE VT2 = 1;
VT1 |VT2 |VT3
------------------------------
NULL |1 |1
WARNING 01003: Null values were eliminated from the argument of a column function.
ij> -- PASS:7568 If WARNING - null value eliminated in set function?
-- PASS:7568 If NULL, 1, 1?
SELECT SUM(NUM)
FROM DATA_TYPE
WHERE NUM IS NOT NULL;
1
-----------
12
ij> -- PASS:7568 If SUM = 12?
SELECT SUM(VT1) AS SUNTA1
FROM V_DATA_TYPE AS TB3;
SUNTA1
---------------------
12
WARNING 01003: Null values were eliminated from the argument of a column function.
WARNING 01003: Null values were eliminated from the argument of a column function.
ij> -- PASS:7568 If WARNING - null value eliminated in set function?
-- PASS:7568 If SUM = 12?
ROLLBACK WORK;
ij> DROP VIEW V_DATA_TYPE;
0 rows inserted/updated/deleted
ij> COMMIT WORK;
ij> -- END TEST >>> 7568 <<< END TEST
-- *********************************************
-- *************************************************////END-OF-MODULE
;
ij>
|