Invalid casting

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
bmnaidu
Charter Member
Charter Member
Posts: 16
Joined: Wed Jun 07, 2006 5:49 am

Invalid casting

Post by bmnaidu »

My server job details :

Source data file : Text File
Target Database : MS Access

The problem is when am trying to read part of text from source file (which is of the format YYYYMMDD) and append that value to a date field to the target am getting "Invalid character value for cast specification (null)".

The way am calculating is -->
Oconv(Iconv(RawOut.DOB1,"DYMD"),"D/DMY[2,2,4]").

If I change the data type of the corresponding column in the target DB to VARCHAR then it is working fine. The problem comes only if the target field is of type DATE or TIMESTAMP.

Please help me to solve this.
Thanks and Regards
NAIDU BUDDHA
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post by sb_akarmarkar »

I dont have experince with MS Access but i think .. You need to convert varchar date you are getting into Date/time datatype of MS Access....
I think convert function my help you...


Thanks,
Anupam
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Check the format for Date and Timestamp in Access.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply