Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In my Qliksense script, I created a date variable using this code:
LET vMinDate = MonthEnd(AddMonths(Today(),-13));
Next I have a SQL SELECT statement where I'm trying to limit the data from my table by using the date variable above (vMinDate) in the WHERE condition....
WHERE "DATA_DT" >= $(vMinDate);
Well, the query runs, but it ignores the date condition and returns ALL the dates in my table. For example, running the code today, the value for vMindDate is 12/31/2014. And when I abort the query, it shows that date value in the data load box. But again, when it runs it returns ALL DATA_DT values.
I presume Teradata is not recognizing the the date format. What can I do? Is there code to change the date variable to the 1141231 format Teradata also likes? Or another way to create the variable to use in the SQL?
THanks!
Hi,
Can you please update, how you were able to solve this issue ?
Thanks