08-13-2013 04:32 PM
In T-SQL I think I could write something like this:
from sample1 a inner join sample2 b
on a.id_src = b.id_src;
I basically want to remove records from one table that appear in the other.
08-13-2013 06:24 PM
Are you doing this on a sql server database, or are you trying to do it on a sas dataset? Because there are multiple ways to do it and each ahs its own benefits and downsides.
Oh, if you are trying to do it on a sas dataset, the method above is the way I have done it in the past (with a slight modification).
from sample1 ss1
where ss1.id_src in (select id_src from Sample2);
I've never actually tried this on a multi key delete however.
If you're doing this on a rbms database (like sql server) or the like, it's actually far more efficient to use a sql pass through function, Let me know if you need help on this.