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
Bind Variable and date manipulation
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 37
- Joined: Fri Oct 21, 2005 4:09 am
Bind Variable and date manipulation
Thanks and Regards
Abha
Abha
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Create a new field of type date and marked as Key. Derive the value as CurrentDate() - 364. Supply this as the value to the database stage, and use Where (DayDt=?)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.