proc sql;
create table PolisyEnd as
select
t1.obj_oid
,t1.PRP_AGREEMENT
,t1.PRP_POLICYNUMBER
,t1.PRP_SOCIETY_PID
,t1.PRP_END_DATE as PRP_END_DATE
from
cmz.WMDTZDP_BH t1 ,
where t1.data_od = &first_day.
and t1.data_do = &gv_date_dly.
left join
(select kontr_id,obj_oid from cmz.BH_D_ZAB_X_ALOK_&thismonth where data_danych = &gv_date_dly.) t2 on t2.obj_oid = t1.obj_oid ;
quit; %let gv_date_dly=%sysevalf(%bquote('&date_dly.'d)); %let thismonth=%sysfunc(putn(%sysfunc(today()),yymmn10.)); %let first_day = %sysfunc(intnx(month,%sysfunc(today()),0,b)); %let last_day = %sysfunc(intnx(month,%sysfunc(today()),0,e));
Now i got error "ERROR 22-322:Syntax error, one of the following was expected:;, !, !!, &, *, **, +, -, /, <, <=, <>, =, >, >=, AND, EQ, EQT, " here : where t1.data_od = &first_day. and t1.data_do = &gv_date_dly.
... View more