Hello, Good day. I've started studying about SAS Integrity Constrains. I'm currently experimenting with its code and syntax in SAS 9.4. And I'm confused right now. 1) Why is this syntax valid? The log window didn't show any errors. 2) Is it ok to put multiple Integrity Constraints on a single variable column declaration? (below: 4 ICs are declared while declaring the variable Age, 2 of them doesn't concern with the Age variable.) (Also, out of the 4 ICs declared, only 1 did NOT work - which is "check (salary>10)". I tested it with other data values.) 3) Why did the row (name="Lorem Ipsum") got inserted into the dataset? His salary is $3, and there's an IC with "check (salary>10)" . /*******************************************************************************/ proc sql feedback; create table test_1 ( constraint OK_name_1 not null (name) message="Name shouldn't be BLANK." msgtype=newline ,constraint OK_prim_key primary key (company_id) ,constraint OK_address check (length(address)>1) ,name char(200) label = "Name of Employee" ,age date label = "Age of Employee" distinct check (salary>10) check (length(name)>5) not null message="Age shouldn't be BLANK." msgtype=newline ,address varchar (200) label = "Home Address" ,company char format=$200. length = 200 label = "Employer" ,department char format=$200. length = 200 label = "Department" ,salary num format=dollar20.2 label = "Salary" ,compensation num format=dollar20.2 label = "Addt'l Compensation" ,company_id char format=$200. length = 200 label = "Company ID" ) ; quit; proc sql feedback; insert into test_1 values("Lorem Ipsum", 23, "New York City", "Vita Sparx", "Human Resource", 3, 10000,"LI001") ; quit; /*******************************************************************************/ Thanks in advance!
... View more