%LET dte = %sysfunc(intnx(month, &today, -27));
i am running a query with a pass through connection and when using
where>'01Mar2015'd everything looks fine but if i use a macro variable
where>&dte then i get the warning 'symbolic reference dte not being resolved" which leads to an error
i also tried to double qoute this macro var and again the same warning and error
Any idea why is this happening?
%global not working either 😞
the code works fine if i use tab2.CREATION_DATE >="01MAR2015"d but not if i use the macro var below and it resolves fine everywhere out of the query but not in the query below
%LET today = %sysfunc(today());
%LET month_27 = %sysfunc(intnx(month, &today, -27));
CREATE TABLE clkb_base AS
JOIN tab2 ON tab1.ADDR_ENTITY_ID = tab2.CUSTOMER_ID
JOIN tab3. ON tab1.ID = tab3.ENTITY_ID
WHERE tab2.CREATION_DATE >="&month_27"
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.