Oracle OCI date 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
asnagaraj
Participant
Posts: 26
Joined: Wed Jun 25, 2003 12:41 am

Oracle OCI date Problem

Post by asnagaraj »

I have a date field in my sequential file in YYYY-MM-DD HH:MI:SS format. when i try to insert this record to my oracle table through OCI stage using my udf sql..which has statement like

insert into datenew values(to_date(:1,'YYYY-MM-DD HH:MI:SS'));

i get an error in inserting this way..

do help me..sooon



Programmer Analyst,
Cognizant,
Chennai.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think you need a slightly different date picture (HH24?).
It is insufficient, on this list, to post "I received an error" - to be of any assistance in diagnosing it is important to provide as much information as possible about the error, in particular any error codes and actual text messages that appear.
Try declaring the date column to be TimeStamp in DataStage and using generated SQL. DataStage will generate SQL using a TO_DATE function.
This reply (in more detail) was posted on datastage-users yesterday; it should appear in the archives (on this site) very soon.

Edited by - ray.wurlod on 01/07/2003 22:14:13
Post Reply