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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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