Page 1 of 1

datastage and sqlserver: datetime and timestamp

Posted: Wed Dec 22, 2010 5:36 am
by sangi1981
Hi,
I have a datastage project, in which, from oracle tables, I write on sqlserver tables.
The server is on unix machine.
The insert statement, via odbc stage, doesn't work.

Among the fields target to load, there are sqlserver datetime and timestamp.
I do not know how to convert timestamp datastage in those two formats.
Please, can someone help me!?
Thank you

Posted: Wed Dec 22, 2010 5:46 am
by major
Hi,

You mean to say that your sources is Oracle and target is sqlserver.
In that case just take substring of 19 for the Oracle timestamp

for ex LnkFromOracle.Timestamp[1,19] assuming LnkFromOracle as your link name from oracle and Timestamp as your column name from oracle which has to be loaded to sqlserver

Thanks,
Major

Posted: Wed Dec 22, 2010 5:55 am
by sangi1981
timestamp datastage.

I read some data from ora, append some other using transform, among them timestamp data (i.e. currenttimestamp), and then try to load to sqlserver.

But, in sqlserver target table there are both datetime and timestamp types.

Thank you

Re: datastage and sqlserver: datetime and timestamp

Posted: Wed Dec 22, 2010 7:33 am
by manoj_23sakthi
Hi
use timestamp with 23,3 it will works

Posted: Wed Dec 22, 2010 8:12 am
by sangi1981
I found solution.
Timestamp sqlserver isn't a "timestamp" properly named, but a binary type used as row version/row number.
So we haven't to load data to field typed timestamp.
Thanks