Bind Variable and date manipulation
Posted: Mon Mar 22, 2010 9:03 pm
Hi ,
I have a teradata query
Select Col1,Col2,Col3
From
Tablename
Where DayDt= CurrentDate-364 /** get a year back date from the current date**/
As current date will keep on changing .I replaced the above query in ODBC stage to provide the date at run time
Select Col1,Col2,Col3
From
Tablename
Where (DayDt=?-364)
The ouput it coming as 1900-00-00 . I understand in datastage I can't do the date caculation on the dates, however this is done in query passed to teradata. Please give thoughts on how to get the correct date.
Thanks,
Abha
I have a teradata query
Select Col1,Col2,Col3
From
Tablename
Where DayDt= CurrentDate-364 /** get a year back date from the current date**/
As current date will keep on changing .I replaced the above query in ODBC stage to provide the date at run time
Select Col1,Col2,Col3
From
Tablename
Where (DayDt=?-364)
The ouput it coming as 1900-00-00 . I understand in datastage I can't do the date caculation on the dates, however this is done in query passed to teradata. Please give thoughts on how to get the correct date.
Thanks,
Abha