diff --git a/BDL/BDL.xml b/BDL/BDL.xml index 8675ddf..7b7958e 100644 --- a/BDL/BDL.xml +++ b/BDL/BDL.xml @@ -124,13 +124,13 @@ Salary NUMBER(7,2) NOT NULL CONSTRAINT Staff_Salary_Range_Invalid CHECK ( Salary BETWEEN 1000 AND 99999.99 ), - Comments VARCHAR2(4000), + Comments CLOB, -- CONSTRAINT STAFF_PK PRIMARY KEY ( Staff_ID ) ); -

The most commmon errors here were either renaming some of the columns, or misspelling the values in the Department and PositionCHECK constraints. Note the use of the CHR function in “Sales Marketing” to avoid the issue with ampersand () characters in TOAD. (Alternatively, use SET ESCAPE '\'; and change the value to 'Sales Marketing'.) Remember also that BETWEEN is inclusive of the two endpoint values, so the upper value for Salary should be 99999.99, not 100000.

+

The most commmon errors here were either renaming some of the columns, or misspelling the values in the Department and PositionCHECK constraints. Note the use of the CHR function in “Sales Marketing” to avoid the issue with ampersand () characters in SQL Developer. (Alternatively, use SET ESCAPE '\'; and change the value to 'Sales Marketing'; or SET DEFINE OFF; and just use “” directly.) Remember also that BETWEEN is inclusive of the two endpoint values, so the upper value for Salary should be 99999.99, not 100000.

@@ -209,7 +209,7 @@ Phone VARCHAR2(12) NOT NULL, Address VARCHAR2(200) NOT NULL, Email VARCHAR2(50), - Comments VARCHAR2(4000), + Comments CLOB, -- CONSTRAINT Customer_PK PRIMARY KEY ( Customer_ID ) ); @@ -290,7 +290,7 @@ Phone VARCHAR2(12) NOT NULL, Address VARCHAR2(200) NOT NULL, Email VARCHAR2(50), - Comments VARCHAR2(4000), + Comments CLOB, -- CONSTRAINT Supplier_PK PRIMARY KEY ( Supplier_ID ) ); @@ -636,7 +636,7 @@ 'backordered', 'shipped' ) ), Staff_ID NUMBER(7) NOT NULL, Customer_ID NUMBER(7) NOT NULL, - Comments VARCHAR2(4000), + Comments CLOB, -- CONSTRAINT Sale_Head_PK PRIMARY KEY ( Sale_Num ), -- @@ -786,7 +786,7 @@ CHECK ( Status IN ( 'complete', 'in progress' ) ), Staff_ID NUMBER(7) NOT NULL, Supplier_ID NUMBER(7) NOT NULL, - Comments VARCHAR2(4000), + Comments CLOB, -- CONSTRAINT Order_Head_Due_Date_Invalid CHECK ( Due_Date > Order_Date ), --