Passing timestamp as parameter.

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
kamalshil
Participant
Posts: 179
Joined: Mon Jun 23, 2008 1:19 am

Passing timestamp as parameter.

Post by kamalshil »

Hi All,
I am trying to pass timestamp value to Stored procedure.
But it is failing to execute the procedure.


I have an Input Parameter of Timestamp as type.
And mapped an input column of timestamp type.
And when i pass null value it is working fine.

I have tried with modifying the procedure with %type also but no success.

I am getting below error.

SP,0: Failure during execution of operator logic.
SP,0: Input 0 consumed 1 records.
SP,0: Output 0 produced 0 records.
SP,0: Fatal Error: Fatal: ORA-01843: not a valid month ORA-06512: at line 1
node_node0: operator [SP], partition 0 of 1, processID 2,072,726 on node0, player 4 terminated unexpectedly.
main_program: Unexpected exit status 1



Any suggestion for this?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Read the error message.

Not a valid month.

Are you passing YMD order when Oracle is expecting MDY or some other variant?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kamalshil
Participant
Posts: 179
Joined: Mon Jun 23, 2008 1:19 am

Post by kamalshil »

Yes i am passing in YMD.
I changed the project default.

But it will affect my other column format which i are used in some different jobs also.

So what best can be done can i change the timestamp format in transformer so it can be passed to SP in required oracle DMY format.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"Best"? Anything that works.

Just make sure that you're sending the format that the database server is expecting.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Pass it as a string in whatever format the proc is expecting.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kamalshil
Participant
Posts: 179
Joined: Mon Jun 23, 2008 1:19 am

Post by kamalshil »

Passed as string as the format expected by the database
Post Reply