Server Job to Parallel Job Basic string conversion

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
koojo
Premium Member
Premium Member
Posts: 43
Joined: Sun Jul 11, 2004 1:30 pm
Location: USA

Server Job to Parallel Job Basic string conversion

Post by koojo »

I am trying to get the current date to load into oracle....

I can load the current timestamp by using Convert CurrentTimestamp() into oracle...

If I try to extract the date as YYYY/MM/DD from the above command my job comiles ok,,,,but I cant see the converted data..
I used the following command Convert (Left(CurrentTimestamp(),10),"-","/") This does not work.....I am quiet used to doing string operations with server jobs....Am new to PX jobs
manojkumarnayak
Participant
Posts: 21
Joined: Fri Nov 04, 2005 11:31 am

Post by manojkumarnayak »

I think you can use CurrentDate() or CurrentTimestamp().
In oracle user defined query you can use SYSDATE.
let me know your requirement
koojo
Premium Member
Premium Member
Posts: 43
Joined: Sun Jul 11, 2004 1:30 pm
Location: USA

Post by koojo »

I tried CurrentDate() would not work...(It gave me a compile time error)...

Have to add an If Then Else in there and dont want to use Sysdate....Am not sure if I am missing something here with PX....or we not able to execute some routines in DS because we are missing some header files...?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think you want to convert "/" to "-" but you've asked to convert "-" to "/". But why not use SYSDATE ?

Convert() is valid as a function in a parallel Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

your requirement is not clear..
if you are loading currentdate, why you need to convert any format..
if still you want then you can user user defined query and convert the sysdate in what ever format you want.
Post Reply