hi, in your sub-query you have not mention the table name from where you are taking the variable name, means if you write 'from' in sub-query then it work perfectly. proc sql; create table newtable as select a.*,b.* from Table1 a,Table2 b where a.acctid not in (select b.acctid from table2 b); quit; answer:- the above code make Cartesian product and give the result as: if you go with the following code: proc sql; create table anewtable2 as select a.* from Table1 a where a.acctid not in (select b.acctid from table2 b); quit; then the output is:- Note:- do-not worry about the values,i have just assumed.
... View more