DATE CONVESRION PROBLEM

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ysrini9
Participant
Posts: 108
Joined: Tue Jul 12, 2005 2:51 am

DATE CONVESRION PROBLEM

Post by ysrini9 »

HI All,

How to convert Static Date to Date format.

I have a specific requirement to insert the constant date into the oracle 9i

How to insert the constant value '31-Dec-9999' using the transformer stage into the oracle 9i table


Thanks,
srini
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Did you try hardcoding '9999-12-31'?
What does it say?
Kris

Where's the "Any" key?-Homer Simpson
panic
Participant
Posts: 17
Joined: Fri Sep 23, 2005 5:58 pm

Post by panic »

USE
Oconv(Iconv("9999 12 31", "D-YMD[4,2,2]"),"D DMY[,A3,]") in the transformer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Hard code it. Use user-defined SQL to incorporate a TO_DATE function in the INSERT statement.
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 »

No need for User Defined SQL. The proper datatype choice will generate the appropriate SQL in the OCI stage automatically.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... unless your hard coded value does not match the default date picture for Oracle.
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 »

Simple enough - make it match! :P
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply