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';
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for 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.