Standard ANSI SQL does this. For example:
data MASTER; A=0; X=0; Y=0; STATUS='Inactive' ;
data TABLE2; A=0; STATUS2='Active';
run;
proc sql;
update MASTER
set X=1,Y=1
where A in (select unique A from TABLE2 where STATUS2='Active')
and STATUS='Inactive';
I don't see any join criteria here.How is table b used?
You can do it with SAS datasets, but if the end result has to be a Teradata table, you best do the update there.
Standard ANSI SQL does this. For example:
data MASTER; A=0; X=0; Y=0; STATUS='Inactive' ;
data TABLE2; A=0; STATUS2='Active';
run;
proc sql;
update MASTER
set X=1,Y=1
where A in (select unique A from TABLE2 where STATUS2='Active')
and STATUS='Inactive';
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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 save with the early bird rate—just $795!
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.