Hello,
I'm trying to get the max date in the prior month from an Oracle table using SAS.
%let tday = %sysfunc(today());
proc means data=Oracle_Table noprint;
where fin_metric_id in(6,8) and (intnx('month',&tday,-1,'begin')<=input(put(dt_id,z8.),yymmdd8.)<=intnx('month',&tday,-1,'end'));
var dt_id;
output out=maxdatei max=alt_inv_dt;
run;
I am getting the correct data from this code but I get this warning message that I want to eliminate.
WARNING: The WHERE clause contains SAS-specific syntax that cannot be passed to the DBMS.
WARNING: SQL generation was not performed because the WHERE clause could not be created.
Not sure if it likes the Begin and End in my INTNX function.
Thanks
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.