Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Passing date variable to Teradata

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!

1 Reply
santoshknc
Partner - Creator
Partner - Creator

Hi,

Can you please update, how you were able to solve this issue ?

Thanks