Hello Community,
I have a query which looks like below,it is taking a more than an hour to update the dataset ds .
can anyone help me to write a hash code to run fast ?
proc sql;
update lib.ds as us
set name=( select name from sashelp.class as g
where us.type= g.name
where us.name in ( select weight from sashelp.cars)
and us.name is null;
quit;
Please supply example data (data steps with datalines) for the involved datasets.
With the SASHELP datasets you use, your conditions make no sense.
@Siva_Harish wrote:
Hello Community,
I have a query which looks like below,it is taking a more than an hour to update the dataset ds .
can anyone help me to write a hash code to run fast ?
proc sql; update lib.ds as us set name=( select name from sashelp.class as g where us.type= g.name where us.name in ( select weight from sashelp.cars) and us.name is null; quit;
Your example code has unbalanced quotes so I would not expect it to run at all.
Provide actual code. If your data set or variable names are "sensitive" then replace those bits with nonsense strings.
How many records are involved in these sets? Are they actually native SAS data sets or are you connecting to another DBMS?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.