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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.