Date Format Error in parallel job

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
aschindler
Participant
Posts: 30
Joined: Wed May 15, 2013 1:22 am
Location: Bangalore

Date Format Error in parallel job

Post by aschindler »

Hi Team,

I am using below below query in oracle connector in my parallel job in order to get yaer and month from date.

select to_char(DATE_COLUMN,'YYYYMM') from table_name.

While running facing error:literal does not match format string.

If i run same query in oracle datbase its working,not sure why datastage throwing fatal error.
Please help,cause i need to compare this to a numeric field from another table which contains year and month ex: 201308
Cheers,
Schindler
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What is your column defined as in DataStage? I would explicitly name the column, as below:

Code: Select all

select to_char(DATE_COLUMN,'YYYYMM') as DataStageColumn from table_name
and define DataStageColumn as char with fixed length 6.
aschindler
Participant
Posts: 30
Joined: Wed May 15, 2013 1:22 am
Location: Bangalore

Post by aschindler »

Hi ArndW,

After changing it to char,it is working fine.

Thanks.
Cheers,
Schindler
Post Reply