m******4 发帖数: 26 | 1 Thanks first!
I have two RAW files:
file1: file2:
id id name
101 101 a
102 110 b
103 102 c
... 112 d
103 e
I only want to READ IN the data in raw file2 which are matched by id in raw
file1,i.e.
id name
101 a
102 c
103 e
Important: 1.these are raw files, not SAS data sets
2.I do not want to read in all records from file2
because it is too large. | a********a 发帖数: 346 | 2 It is easy. Try
Proc sql;
create table file3 as
select a.id, a.name
from file2 as a
where a.id in (select id from file1);
quit; | m******4 发帖数: 26 | 3 Thanks!
but the files are not SAS datasets, they are raw files.
【在 a********a 的大作中提到】 : It is easy. Try : Proc sql; : create table file3 as : select a.id, a.name : from file2 as a : where a.id in (select id from file1); : quit;
|
|