Hi All,
Could you please help me how to give Default value for a date Target column.In Oracle we can give sysdate right.Like wise I am asking.I assigned OCONV(@Date,"D2") to that column but is it giving the following Error message.
SQLSTATE=22008, DBMS.CODE=0
[DataStage][SQL Client][ODBC][Oracle][ODBC]Datetime field overflow.
What I need to do????
Please tell me the steps how to go about it.
Thanks & Regards,
K.S.Rajan.
(Moderator had to put missing DS release and OS to update topic, FYI they are unknown)
how to give Default value for a date Target column.In
Moderators: chulett, rschirm, roy
Do you have a Support contract? Keep in mind the fact that Ascential's support is not only for the occasional bug report, but that they are more than happy to help with the "How in the heck do I do this?" kind of question. IMHO, their support has been great when I've thrown things like that at them.
That being said, if your are trying to default a date to the current sydate when it is null, a couple of things come to mind. If your source is Oracle, use NVL in your original query. In DataStage, test for null and then substitute in the system date. Check out things like the TimeDate() function, if you need a full timestamp or Date() for the current date. In your example you probably need to further qualify the conversion, something more like:
Oconv(Date(), "D4/MDY") to get MM/DD/YYYY for example
but I'd need to know the format that the ODBC stage is expecting the date to arrive in, which also depends on what data type you've defined the field as.
-craig
That being said, if your are trying to default a date to the current sydate when it is null, a couple of things come to mind. If your source is Oracle, use NVL in your original query. In DataStage, test for null and then substitute in the system date. Check out things like the TimeDate() function, if you need a full timestamp or Date() for the current date. In your example you probably need to further qualify the conversion, something more like:
Oconv(Date(), "D4/MDY") to get MM/DD/YYYY for example
but I'd need to know the format that the ODBC stage is expecting the date to arrive in, which also depends on what data type you've defined the field as.
-craig