Page 1 of 1

Problem loading timestamp using ODBC Connecter

Posted: Thu Apr 16, 2015 8:43 pm
by SURA
Hello all

Code: Select all

Need:  Load timestamp including microseconds. 
Source : text file
Target:  SQL server table. 
Target Data type : timestamp
Data element : Enabled to timestamp in the ODBC Connecter stage.
Sample Data: 2015-04-16 00:00:57.495
I am using Datastage Server job to load the data using ODBC Connector stage, but it is loading the values as 0 after seconds value. For example the value looks like 2015-04-16 00:00:57.000

If i use the Old ODBC Stage with the same settings, the value is loading as it is (2015-04-16 00:00:57.495)!

Please let me know whether i am missing to tick something in the stage level to load the data including microseconds?

Any help?

Posted: Thu Apr 16, 2015 11:15 pm
by vinothkumar
Did you see any extended property 'Microseconds' in your ODBC connector stage for that timestamp column. If yes, please enable it and try.

Posted: Thu Apr 16, 2015 11:38 pm
by SURA
I have enabled it and mentioned it in my post.

Thanks.

Posted: Fri Apr 17, 2015 5:47 am
by ray.wurlod
Server jobs don't have a timestamp data type. Try reading it as a Char or VarChar data type. You may need a CAST in your SQL, but try it without that first.

Posted: Fri Apr 17, 2015 7:50 am
by chulett
SURA wrote:I have enabled it and mentioned it in my post.
Actually no, no you didn't, at least not clearly. You did mention the word 'microseconds' one time and say something about 'enabled to timestamp' but that doesn't exactly clear it all up for us.

I would have asked the same question. :wink:

Posted: Fri Apr 17, 2015 1:47 pm
by SURA
chulett wrote:Actually no, no you didn't, at least not clearly.

Code: Select all

Data element : Enabled to timestamp in the ODBC Connecter stage.  This is the option i have enabled via extended property.
You are right. i haven't said explicitly and sorry for that.

Posted: Fri Apr 17, 2015 1:49 pm
by SURA
ray.wurlod wrote:Server jobs don't have a timestamp data type.
I can't understand your advise, let me understand properly and try it.

Posted: Mon Apr 25, 2016 10:28 pm
by shankararunn
Hi - Did you get any solution for this ? I am also facing the same issue in ODBC connector ? kindly help

Posted: Mon Apr 25, 2016 11:09 pm
by chulett
You are facing the same issue in a Server job? Assuming your problem is with a parallel job, please start a new post and detail for us exactly what the issue is that you are having.