hello everyone,
i have a column containing ID , and a big table containing ID too.
How can i check if a list of ID exist or not in the big table, using sas viya.
Many thanks
If your intention is to check the existence of the ID's from small table in the big table you can try the following Proc SQL.
Proc sql;
Select id from big_table
where id in (Select id from small_table);
quit;
This may not be the best approach but easy to understand and use.
A SAS data step hash lookup loading the small table into the hash table is one way to go. Just make sure that you execute the process in the place where the big table exists - like if the big table is in CAS then make sure that you also load the small table into CAS prior to the hash lookup.
If your intention is to check the existence of the ID's from small table in the big table you can try the following Proc SQL.
Proc sql;
Select id from big_table
where id in (Select id from small_table);
quit;
This may not be the best approach but easy to understand and use.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.