Datetime Overflow Error

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
priyankalaisatwar
Participant
Posts: 11
Joined: Wed Aug 28, 2013 6:38 am

Datetime Overflow Error

Post by priyankalaisatwar »

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.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Datetime Overflow Error

Post by SURA »

Let us know what you have tried from your end?
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
priyankalaisatwar
Participant
Posts: 11
Joined: Wed Aug 28, 2013 6:38 am

Re: Datetime Overflow Error

Post by priyankalaisatwar »

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
umaisnazir
Participant
Posts: 3
Joined: Thu Feb 02, 2012 1:42 am
Location: no

Re: Datetime Overflow Error

Post by umaisnazir »

StringToTimestamp(STG1,"%yyyy-%mm-%dd %hh:%nn:%ss.0") -->
StringToTimestamp(STG1,"%yyyy-%mm-%dd %hh:%nn:%ss") Remove the 0 and try .
Thanks and Regards,
Umais
priyankalaisatwar
Participant
Posts: 11
Joined: Wed Aug 28, 2013 6:38 am

Re: Datetime Overflow Error

Post by priyankalaisatwar »

After Removing .0 also I am getting the same error. Do I need to change the lenght of this column in Transformer Output Stream?
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

what is the column type in SQL server for this column?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
umaisnazir
Participant
Posts: 3
Joined: Thu Feb 02, 2012 1:42 am
Location: no

Re: Datetime Overflow Error

Post by umaisnazir »

Can you please check the data type of your target column?
Also, timestamp of 38 should accept it .
Thanks and Regards,
Umais
priyankalaisatwar
Participant
Posts: 11
Joined: Wed Aug 28, 2013 6:38 am

Post by priyankalaisatwar »

Column Type in Target SQL server is Datetime and SOURCe Datatype is DB2 - Timestamp
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

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.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

priyankalaisatwar wrote:Column Type in Target SQL server is Datetime and SOURCe Datatype is DB2 - Timestamp
I am not in the DS. Can you please share you date like format from source as well as target!

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.
priyankalaisatwar
Participant
Posts: 11
Joined: Wed Aug 28, 2013 6:38 am

Post by priyankalaisatwar »

I tried to load that column as varchar, Now data is getting loaded and I am not getting any warnings. But I want to load it in datetime dattype only.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Answer Arnd's question. Post examples of your extracted DB2 data.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply