I have the following code where I use proc sql to identify readmits from claim data: PROC SQL; Create Table all.readmits2 as Select A.uidnum, A.DISD label = "Previous Discharge Date", B.ADMD label = "Admission Date", B.ADMD-A.DISD as Gap, 1 as Tag From all.hssc_ub__shp_visits_match as A join all.hssc_ub__shp_visits_match as B On A.uidnum = B.uidnum Where B.ADMD-A.DISD between 1 and 30; Quit; The coding works well and I am able to identify the approiate 30 day readmits however, I would like to include important demographic/utlization variables in my sql table (all_sex, all_age, all_race, all_race2, cond3, all_ip, all_ed, all_op, all_setting,). When I try to inculde these additional variables, I run into issues. I used the following code and recieved the error message posted below: PROC SQL; Create Table all.readmits4 as Select A.uidnum, all_sex, all_age, all_race, all_race2, cond3, all_ip, all_ed, all_op, all_setting, A.DISD label = "Previous Discharge Date", B.ADMD label = "Admission Date", B.ADMD-A.DISD as Gap, 1 as Tag, From all.hssc_ub__shp_visits_match as A join all.hssc_ub__shp_visits_match as B On A.uidnum = B.uidnum Where B.ADMD-A.DISD between 1 and 30; Quit; Error Message: 199 From all.hssc_ub__shp_visits_match as A join all.hssc_ub__shp_visits_match as B --- ---- 22 76 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, ',', -, /, <, <=, <>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, FROM, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=. ERROR 76-322: Syntax error, statement will be ignored. 199! From all.hssc_ub__shp_visits_match as A join all.hssc_ub__shp_visits_match as B ---- 22 ERROR 22-322: Syntax error, expecting one of the following: a quoted string, ',', AS, FORMAT, FROM, INFORMAT, INTO, LABEL, LEN, LENGTH, TRANSCODE. How can Inculde the additional variables in my SQL table? Thanks,
... View more