Hi , Please see below complete code and also see the log . Still I am getting error. proc sql; create table UMAppealLog as select a.x_f_b_prov_id, a.x_f_b_prov_nm, b.case_id, b.CASE_TYPE_CD, datepart(b.valid_from_dttm) as Valid_from_dt, c.x_p_recoup_amt, c.X_P_AFTR_REBUTTAL_AMT, d.x_b_no_analyst_nm, e.x_b_admin_ar, e.X_B_ADMIN_RV_INFO, e.X_B_FAIR_DT, e.X_B_FAIR_COMM, e.X_B_DIS_DT_DECISION, e.X_B_DIS_COURT_COMM, e.X_B_APPEAL_LOG, f.x_b_case_status from ecm_rpt.c_findings a, ecm_rpt.case_pivot b, ecm_rpt.c_recoupment c, ecm_rpt.c_peer_review d, ecm_rpt.c_x_appeal e, ecm_rpt.c_referred_from f where a.case_rk=b.case_rk and b.case_rk=c.case_rk and c.case_rk=d.case_rk and d.case_rk=e.case_rk and e.case_rk=f.case_rk and b.CASE_TYPE_CD eq 'PROV' and e.X_B_APPEAL_INFO='1' and f.x_b_case_status ne 'Closed' ; quit; /*data UMAppealLog1;*/ /*set UMAppealLog;*/ /*Valid_from_date=strip(put(Valid_from_dt,date9.));*/ /*run;*/ %let OPEN_DATE_MIN=19apr2016; %let OPEN_DATE_MAX=19apr2017; TITLE1 "UM Appeal Log"; TITLE2 "From &OPEN_DATE_MIN. To &OPEN_DATE_MAX.)"; proc report data=UMAppealLog nowd split='*'; where "valid_from_dt"d between "&open_date_min" and "&open_date_max"; column x_f_b_prov_id x_f_b_prov_nm case_id x_p_recoup_amt x_b_no_analyst_nm X_P_AFTR_REBUTTAL_AMT x_b_admin_ar X_B_ADMIN_RV_INFO X_B_FAIR_DT X_B_FAIR_COMM X_B_DIS_DT_DECISION X_B_DIS_COURT_COMM X_B_APPEAL_LOG; define x_f_b_prov_id/"Provider ID"; define x_f_b_prov_nm/"Provider Name"; define case_id/"Case ID"; define x_p_recoup_amt/"Issue Account * Receivable#"; define x_b_no_analyst_nm/"UM Analyst"; define X_P_AFTR_REBUTTAL_AMT/"Administration*Reconsideration*Amt"; define x_b_admin_ar/"AR LETTER DATE"; define X_B_ADMIN_RV_INFO/"AR DECISIONS"; define X_B_FAIR_DT/"Fair Hearing*Decision Letter Date"; define X_B_FAIR_COMM/"Fair Hearing*Decision Comments"; define X_B_DIS_DT_DECISION/"District Court * Decision Date"; define X_B_DIS_COURT_COMM/"District Court*Comments"; define X_B_APPEAL_LOG/"Appeal Comments "; run; =========== LOG ========= 69 proc report data=UMAppealLog nowd split='*'; 70 where "valid_from_dt"d between "&open_date_min" and "&open_date_max"; ERROR: Invalid date/time/datetime constant "valid_from_dt"d. ERROR: Syntax error while parsing WHERE clause.
... View more