Hi SAS Forum, I was trying to understand how does the proc sql sub query function (I never used sub querying). Could you please let me know what is the problem in the code below. proc sql; create table anyname as select a.* ,b.* from Table1 a ,Table2 b where a.acctid not IN (select b.acctid); quit; Error messege comes like below: 15 proc sql; 16 create table dunga as select 17 a.* 18 ,b.* 19 from a1 a 20 ,a2 b 21 where a.patid not IN (select b.patid); _ 22 76 ERROR 22-322: Syntax error, expecting one of the following: a quoted string, !, !!, &, *, **, +, ',', -, /, <, <=, <>, =, >, >=, ?, AND, AS, BETWEEN, CONTAINS, EQ, EQT, FORMAT, FROM, GE, GET, GT, GTT, IN, INFORMAT, INTO, IS, LABEL, LE, LEN, LENGTH, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, TRANSCODE, ^, ^=, |, ||, ~, ~=. ERROR 76-322: Syntax error, statement will be ignored. Thanks, Mirisa
... View more