Hi Tom,
Thank you so much. I'm a business analyst who does database manipulation when I have to, so I'm not very good at proc SQL, so I seem to have not understood how to do this properly. Do you think you can offer insite into what I'm doing wrong?
Thank you so much for your help!!
Barb
Here is my program:
proc sql;
create table op_est as
(SELECT cast(e.affltn_srvc_prvdr_id as varchar(30)), p.prvdr_idntfr as pid_doc, p.prvdr_tin as tin_doc, e.srvc_code, e.srvc_estmt_ctgry_code, e.allwd_srvc_estmt_amnt as est_total_amt
FROM DRCTRY_C.ds_srvc_prvdr p, DRCTRY_C.ds_srvc_estmt e
WHERE p.srvc_prvdr_id = e.srvc_prvdr_id AND e.allwd_srvc_estmt_amnt > 0 AND e.srvc_code in ('45380', '45378', '43239', '45385', '66984', '29881', '29826', '95810', '58558', '30520', '29888') ) ; quit;
Here is the log with the error message that I'm getting:
24 proc sql; 25 create table op_est as 26 27 (SELECT cast(e.affltn_srvc_prvdr_id as varchar(30)), __ 22 202 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, ), *, **, +, ',', -, /, <, <=, <>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
28 p.prvdr_idntfr as pid_doc, 29 p.prvdr_tin as tin_doc, 30 e.srvc_code, 31 e.srvc_estmt_ctgry_code, 32 e.allwd_srvc_estmt_amnt as est_total_amt 33 34 FROM DRCTRY_C.ds_srvc_prvdr p, 35 DRCTRY_C.ds_srvc_estmt e 36 37 WHERE p.srvc_prvdr_id = e.srvc_prvdr_id 38 AND e.allwd_srvc_estmt_amnt > 0 39 AND e.srvc_code in ('45380', '45378', '43239', '45385', '66984', '29881', '29826', '95810', '58558', '30520', 39 ! '29888') 40 ) 41 ; NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements. 42 quit; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE SQL used (Total process time): real time 0.02 seconds
... View more