SqlServer2005 datetime

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
betterthanever
Participant
Posts: 152
Joined: Tue Jan 13, 2009 8:59 am

SqlServer2005 datetime

Post by betterthanever »

Dear Gurus,
here is my problem.

i am trying to extract the data from sqlserver2005 table. the field is datetime field (ex: 2009-01-22 21:00:55.330).

i imported the metadata and the datatype is timestamp(23,3).

when i use view data ( using ODBC Eneterprise stage) the above time is showing as 2009-01-22 21:00:55 and the data is loaded to target sqlserver2005 table as 2009-01-22 21:00:55.000
i have to extract the milliseconds and i have to load the same values(.330) not (.000) for milliseconds field.


i tried changing the default format in the job properties to
%yyyy-%mm-%dd %hh:%nn:%ss:%SSS
but does not help.

Appreciate any help.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Extract as varchar and use a SQL Server function to convert back and forth from varchar to timestamp when reading and writing to the database.
Mamu Kim
betterthanever
Participant
Posts: 152
Joined: Tue Jan 13, 2009 8:59 am

Post by betterthanever »

[quote="kduke"]Extract as varchar and use a SQL Server function to convert back and forth from varchar to timestamp when reading and writing to the database. ...[/quote]

thanks for the reply but it does not work..
Post Reply