I need all the records so i can sum the amt later Changed it to this: proc sql; CONNECT TO ORACLE (user=&name pw=&pass path=Exa); create table P_1 as select * from connection to oracle (select ID,SEQ_NO,Tableb_DATE,AMT from p_act ) ( WHERE ID IN (SELECT ID FROM table a) and ID_date > trunc(tableb_Date),'DD-Mon'YY' ) ; disconnect from oracle; quit; error i get now is : 22 200 ERROR 22-322: Syntax error, expecting one of the following: ;, !, !!, &, *, **, +, -, /, <, <=, <>, =, >, >=, AND, EQ, EQT, EXCEPT, GE, GET, GROUP, GT, GTT, HAVING, INTERSECT, LE, LET, LT, LTT, NE, NET, NOT, OR, ORDER, OUTER, UNION, ^, ^=, |, ||, ~, ~=. ERROR 200-322: The symbol is not recognized and will be ignored.
... View more