Page 1 of 1

Date Format Error in parallel job

Posted: Mon Aug 19, 2013 9:21 am
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

Posted: Mon Aug 19, 2013 9:52 am
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.

Posted: Mon Aug 19, 2013 11:41 pm
by aschindler
Hi ArndW,

After changing it to char,it is working fine.

Thanks.