01-25-2017 07:20 PM - edited 01-25-2017 07:24 PM
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.
01-25-2017 09:41 PM
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.
01-26-2017 02:10 AM
02-16-2017 10:25 AM