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
|
ij> AUTOCOMMIT OFF;
ij> -- MODULE DML080
-- SQL Test Suite, V6.0, Interactive SQL, dml080.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION SCHANZLE
create schema SHANZLE;
0 rows inserted/updated/deleted
ij> set schema SHANZLE;
0 rows inserted/updated/deleted
ij> --O SELECT USER FROM HU.ECCO;
VALUES USER;
1
--------------------------------------------------------------------------------------------------------------------------------
SCHANZLE
ij> -- RERUN if USER value does not match preceding AUTHORIZATION comment
-- date_time print
-- NOTE Direct support for SQLCODE or SQLSTATE is not required
-- NOTE in Interactive Direct SQL, as defined in FIPS 127-2.
-- NOTE ********************* instead ***************************
-- NOTE If a statement raises an exception condition,
-- NOTE then the system shall display a message indicating that
-- NOTE the statement failed, giving a textual description
-- NOTE of the failure.
-- NOTE If a statement raises a completion condition that is a
-- NOTE "warning" or "no data", then the system shall display
-- NOTE a message indicating that the statement completed,
-- NOTE giving a textual description of the "warning" or "no data."
-- TEST:0462 SQLCODE 100: DELETE with no data!
DELETE FROM HU.STAFF
WHERE EMPNUM = 'E7';
0 rows inserted/updated/deleted
WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
ij> -- PASS:0462 If SQLCODE = 100 or no data, 0 rows deleted?
DELETE FROM HU.STAFF;
5 rows inserted/updated/deleted
ij> -- PASS:0462 If 5 rows deleted?
DELETE FROM HU.STAFF;
0 rows inserted/updated/deleted
WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
ij> -- PASS:0462 If SQLCODE = 100 or no data, 0 rows deleted?
DELETE FROM HU.STAFF
WHERE EMPNUM = 'E1';
0 rows inserted/updated/deleted
WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
ij> -- PASS:0462 If SQLCODE = 100 or no data, 0 rows deleted?
-- restore
ROLLBACK WORK;
ij> -- END TEST >>> 0462 <<< END TEST
-- *********************************************
-- TEST:0463 SQLCODE 100: UPDATE with no data!
UPDATE HU.STAFF
SET CITY = 'NOWHERE'
WHERE EMPNAME = 'NOBODY';
0 rows inserted/updated/deleted
WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
ij> -- PASS:0463 If SQLCODE = 100 or no data, 0 rows updated?
UPDATE HU.STAFF
SET GRADE = 11;
5 rows inserted/updated/deleted
ij> -- PASS:0463 If 5 rows updated?
DELETE FROM HU.STAFF;
5 rows inserted/updated/deleted
ij> -- PASS:0463 If 5 rows deleted?
UPDATE HU.STAFF
SET CITY = 'NOWHERE';
0 rows inserted/updated/deleted
WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
ij> -- PASS:0463 If SQLCODE = 100 or no data, 0 rows updated?
UPDATE HU.STAFF
SET CITY = 'NOWHERE'
WHERE EMPNAME = 'NOBODY';
0 rows inserted/updated/deleted
WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
ij> -- PASS:0463 If SQLCODE = 100 or no data, 0 rows updated?
-- restore
ROLLBACK WORK;
ij> -- END TEST >>> 0463 <<< END TEST
-- *************************************************////END-OF-MODULE
;
ij>
|