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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.