BookmarkSubscribeRSS Feed
EEng
Obsidian | Level 7

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

1 REPLY 1
LinusH
Tourmaline | Level 20
No, it doesn't like the INTNX function as such.
See here for supported functions:
http://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.3&docsetId=acreldb&docsetTarget=p0f64...
But can't see anything that would stop you to use it prior to the PROC using %sysfunc.
Data never sleeps

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 853 views
  • 0 likes
  • 2 in conversation