BookmarkSubscribeRSS Feed
Siva_Harish
Obsidian | Level 7

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;
2 REPLIES 2
ballardw
Super User

@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?

sas-innovate-white.png

Register Today!

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.

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 628 views
  • 0 likes
  • 3 in conversation