Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

Chapter 5: Creating and Managing Tables ... > Displaying Integrity Constraints for... - Pg. 205

proc sql undo_policy=none; create table work.discount4 (Destination char(3), BeginDate num Format=date9., EndDate num format=date9., Discount num, constraint ok_discount check (discount le .5), constraint notnull_dest not null(destination)); insert into work.discount4 values('CDG','03MAR2000'd,'10MAR2000'd,.15) values('LHR','10MAR2000'd,'12MAR2000'd,.55); Discount WARNING: The SQL option UNDO_POLICY=REQUIRED is not in effect. If an error is detected when processing this INSERT statement, that error will not cause the entire statement to fail. ERROR: Add/Update failed for data set WORK.DISCOUNT4 because data value(s) do not comply with integrity constraint ok_discount. NOTE: This insert failed while attempting to add data from VALUES clause 2 to the data set. NOTE: 2 rows were inserted into WORK.DISCOUNT4 -- of these 1 row was rejected as an ERROR, leaving 1 row that was inserted