Hi All, I have 2 queries I need to execute one after another: First: I need to pull data for the current month in a pass through... the date is in datetime format: This is what I have tried so far without any results.... I know that I can specify the dates but I am trying to make it so that I don't need to so it can be automated %Let today = %sysfunc(date(),date9.); %let sysmonth= %sysfunc(month("&sysdate"d)); %let sysyear= %sysfunc(year("&sysdate"d)); PROC SQL; connect to oracle (user=&name pass=&pass path=Exa); create table DF as select * from connection to Oracle (select * from tables where month(ACTV_DATE) = &sysmonth. ) ; disconnect from Oracle; quit; second step.. all these records then have to pull data from a second table where the date ACTV_DATE is after the date in the second table. Again all dates are in datetime format PROC SQL; connect to oracle (user=&name pass=&pass path=ExaODIN); create table DF1 as select * from connection to Oracle (select * from activity where ID in (select IDfrom df) and datepart(actv_date) >= datepart(secondtable_date) ; disconnect from Oracle; quit; I usually use pass throughs to pull data... i haven't tried segmentation at this level. Really appreciate your help
... View more