Hello,
I am using SAS EG 7.11 and I would like to create a table and setting some variables to a default value as below
Except this code is not working.
Does someone has already work on that issue.
Regards,
proc sql;
create table table1 (field1 num,
field2 num default 5557,
field3 num default 1337,
field4 date default today());
quit;
SAS doesn't support default constraints (unfortunately).
If you have access to a SQL Server database you can use SQL pass through to specify these.
Could you please provide me an example how set default value using SQL pass through facility?
Thanks
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.