Datetime Overflow Error
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 11
- Joined: Wed Aug 28, 2013 6:38 am
Datetime Overflow Error
I am trying to Load data From DB2 to SQL Server, I am getting datetime overflow error. I tried to just load timestamp without microseconds but still getting the same error. Please help! The job is in production and I am getting the error.
Re: Datetime Overflow Error
Let us know what you have tried from your end?
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
-
- Participant
- Posts: 11
- Joined: Wed Aug 28, 2013 6:38 am
Re: Datetime Overflow Error
Hi Sura,
First I took one stage variable STG1 and dump the Timestamp column into it. like below
left(timestamp_column,19) --> stg1
and the in transformer output link, In the output Timestamp column I did:-
StringToTimestamp(STG1,"%yyyy-%mm-%dd %hh:%nn:%ss.0") --> Output_timestamp_column
Getting the error :-
[IBM(DataDirect OEM)][ODBC SQL Server Driver]Datetime field overflow [odbcUtils.C:1352]"
Please suggest
First I took one stage variable STG1 and dump the Timestamp column into it. like below
left(timestamp_column,19) --> stg1
and the in transformer output link, In the output Timestamp column I did:-
StringToTimestamp(STG1,"%yyyy-%mm-%dd %hh:%nn:%ss.0") --> Output_timestamp_column
Getting the error :-
[IBM(DataDirect OEM)][ODBC SQL Server Driver]Datetime field overflow [odbcUtils.C:1352]"
Please suggest
-
- Participant
- Posts: 3
- Joined: Thu Feb 02, 2012 1:42 am
- Location: no
Re: Datetime Overflow Error
StringToTimestamp(STG1,"%yyyy-%mm-%dd %hh:%nn:%ss.0") -->
StringToTimestamp(STG1,"%yyyy-%mm-%dd %hh:%nn:%ss") Remove the 0 and try .
StringToTimestamp(STG1,"%yyyy-%mm-%dd %hh:%nn:%ss") Remove the 0 and try .
Thanks and Regards,
Umais
Umais
-
- Participant
- Posts: 11
- Joined: Wed Aug 28, 2013 6:38 am
Re: Datetime Overflow Error
After Removing .0 also I am getting the same error. Do I need to change the lenght of this column in Transformer Output Stream?
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
-
- Participant
- Posts: 3
- Joined: Thu Feb 02, 2012 1:42 am
- Location: no
Re: Datetime Overflow Error
Can you please check the data type of your target column?
Also, timestamp of 38 should accept it .
Also, timestamp of 38 should accept it .
Thanks and Regards,
Umais
Umais
-
- Participant
- Posts: 11
- Joined: Wed Aug 28, 2013 6:38 am
What is the exact DDL definition of your SQL-Server datetime column?
The DB2 timestamp type has 9 microsecond digits, and not even the SQL-Server datetime2(7) can store that much, and you are using datetime which barely has 3 centisecends.
The DB2 timestamp type has 9 microsecond digits, and not even the SQL-Server datetime2(7) can store that much, and you are using datetime which barely has 3 centisecends.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I am not in the DS. Can you please share you date like format from source as well as target!priyankalaisatwar wrote:Column Type in Target SQL server is Datetime and SOURCe Datatype is DB2 - Timestamp
All you need to do is a proper conversion before load the data into SQL Server and you have functions in TFM & Modify stage.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
-
- Participant
- Posts: 11
- Joined: Wed Aug 28, 2013 6:38 am