BookmarkSubscribeRSS Feed
sathya66
Barite | Level 11

Hi All,

 

Need to run query based on another dataset column values.

 

Like

 

data a;

set b;

if column_1= 'm' then delete ;

if column_1= 'nn' then clumn_1=plus ;

so  values(m,nn,etc) are in another X data set

1 REPLY 1
PaigeMiller
Diamond | Level 26

Please show us examples of the datasets involved. A small portion of each data set ought to be sufficient. Please provide the data sets as DATA step code, as explained in these instructions. Do not provide the data as screen captures or attachments.

 

Also please explain how we know what these steps should be, given the two data sets, especially the part of the code after THEN

 

if column_1= 'm' then delete ;
if column_1= 'nn' then clumn_1=plus ;

 

--
Paige Miller

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 432 views
  • 0 likes
  • 2 in conversation