I have two tables, that both have an ID column. I'd like to select the rows in the one table, that have an ID that is in the second table.
I R I would do this be saying tbl1[tbl$ID %in% tbl2$ID,], but I haven't found a way to translate this into SAS.
Try this:
PROC SQL;
CREATE TABLE result AS
SELECT t2.*
FROM table1 AS t1, table2 AS t2
WHERE t1.id = t2.id
;
QUIT;
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments