datastage and sqlserver: datetime and timestamp

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
sangi1981
Participant
Posts: 99
Joined: Fri Jun 13, 2008 8:10 am

datastage and sqlserver: datetime and timestamp

Post 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
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post 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
sangi1981
Participant
Posts: 99
Joined: Fri Jun 13, 2008 8:10 am

Post 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
manoj_23sakthi
Participant
Posts: 47
Joined: Tue Feb 23, 2010 12:16 am
Location: CHENNAI

Re: datastage and sqlserver: datetime and timestamp

Post by manoj_23sakthi »

Hi
use timestamp with 23,3 it will works
sangi1981
Participant
Posts: 99
Joined: Fri Jun 13, 2008 8:10 am

Post 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
Post Reply