Problem with flat Files related to date field

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
rkdatastage
Participant
Posts: 107
Joined: Wed Sep 29, 2004 10:15 am

Problem with flat Files related to date field

Post by rkdatastage »

Hi

Can any one share me the knowledge how to handle date field extracting from flat files.

Here i am getting error like
"Transformer_3: ORA-01830: date format picture ends before converting entire input string"

Actullay my source is in yyyy-mm-dd HH:MM:SS.SSS
target table format is oracle format.

by the conversion functions i am getting the data converted into the format of oracle but it is throwing warning and data is not populating into target table

Thanks inadvance

RK
rkdatastage
Participant
Posts: 107
Joined: Wed Sep 29, 2004 10:15 am

Post by rkdatastage »

Hi Folks

Can anybody share their idea about this problem

RK
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

The autogenerated SQL puts to_date functions on your DATE or TIMESTAMP data type columns. If your data matches the format token in the SQL, everything works. I suspect your source data is ready to load, just verify. You won't have to do any DS functions to change the data.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

DATE target field? Strip the milliseconds, they can't be stored in a DATE field.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jojipjohn
Participant
Posts: 52
Joined: Wed May 17, 2006 3:40 am
Location: India

Remove "HH:MM:SS.SSS"of the date or change target

Post by jojipjohn »

Try changing your datetype in the target stage to timestamp. If you don't want the "HH:MM:SS.SSS" part trim the source before loading it into the target.
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post by sb_akarmarkar »

You can also try TO_DATE of oracle function by writing user-defined SQL insert statement in target stage....


Thanks,
Anupam
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The OCI stages will automatically generate the TO_DATE (or TO_CHAR) for the appropriate data types, no need for user-defined sql for something simple like that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post by sb_akarmarkar »

Can you check your OCI Stage genrated TO_DATE is it matching with "yyyy-mm-dd HH:MM:SS.SSS"....


Thanks,
Anupam
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think by now you are convinced that it's an Oracle problem, not a problem with accessing flat files.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply