Using DataStage version 6 and I have no experience with Oracle databases.
I am trying to insert a row in an Oracle table VIA AN ODBC stage. The Oracle table has a column with a 'date' format. How do I format the date field so that the insert works? I am currently getting the following message:
[DataStage][SQL Client][ODBC][DataDirect][ODBC Oracle driver]Datetime field overflow. Error in parameter 7.
Where parameter 7 is:
TRANSMISSION_DATE="20030521"
Any help greatly appreciated.
Oracle date format
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 483
- Joined: Thu Jun 12, 2003 4:47 pm
- Location: St. Louis, Missouri USA
Tony
I think he wants to know how to format a date to 'YYYY-MM-DD HH:MM:SS'. It looks like your date is coming in as a string. I would create a stage variable and initialize it to:
DateOut = TRANSMISSION_DATE[1,4]:"-":TRANSMISSION_DATE[5,2]:"-":TRANSMISSION_DATE[7,2]:" 00:00:00"
The [] is the same as the substring() function. Try that.
Kim.
Kim Duke
DwNav - ETL Navigator
www.Duke-Consulting.com
I think he wants to know how to format a date to 'YYYY-MM-DD HH:MM:SS'. It looks like your date is coming in as a string. I would create a stage variable and initialize it to:
DateOut = TRANSMISSION_DATE[1,4]:"-":TRANSMISSION_DATE[5,2]:"-":TRANSMISSION_DATE[7,2]:" 00:00:00"
The [] is the same as the substring() function. Try that.
Kim.
Kim Duke
DwNav - ETL Navigator
www.Duke-Consulting.com