how can i do this, but in sas eg (odbc engine) through implicit statements?
proc sql;
connect to sqlsvr as mydb
(datasrc="SASDATA" user="sas" password="xxx");
select * from connection to mydb
(CREATE INDEX ZP on dashboard_novacik (ZP) ;
CREATE INDEX Fin on dashboard_novacik (Fin) ;
);
QUIT;
This code works in SAS Studio (sqlsvr engine).
Thanks
Both SAS EG and SAS Studio are clients that connect to a SAS Server where the code executes.
If you're connecting with both clients to the same environment with the same user then the same code will work using either client.
Not sure about SQL Server but with many databases a Create Index would fail if the index already exists - meaning you would need to either first drop the index or check for existence.
Something like:
Create a LIBNAME to the SQL Server schema, then run
proc sql;
create index zp on sqllib.dashboard_novacik (zp);
create index fin on sqllib.dashboard.novacik (fin);
quit;
But I would not be surprised if this does not work and you are forced to use explicit pass-through.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.