Hi All,
I am trying to extract data from teradata.
i am using Pass thru to do this, i need to extract only the records which have an expiry date greater than today.
I have created a Macro variable tdy, as this code needs to be run daily only the stores keeps changing.
Where a. Exp_date > &tdy. and Sales GT 500 and Store_loc in ('xxxxx','yyyyy','oooo','zzzz');
but i am getting more records when i am extracting the data using SAS pass thru facility but when i run the similar query on Teradata
i get less number of records .
Where a. Exp_date > Current_date and Sales GT 500 and Store_loc in ('xxxxx','yyyyy','oooo','zzzz');
And also i need to pass few Store names in the Where clause as shown in the above where clause. i am planning to do this by passing the comma separated macro variables.
I have already read in the stores details in a comma separated macro variable but i am struggling to get this macro variable in.
Any suggestion or guidance is helpful.
Post your code and log if available. Make sure you also post the bit which shows us to what the macro variables you're using in your code resolve.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.