[Oracle][ODBC][Ora]ORA-01861: literal does not match format

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
bgs_vb
Premium Member
Premium Member
Posts: 79
Joined: Mon Jan 02, 2006 5:51 am

[Oracle][ODBC][Ora]ORA-01861: literal does not match format

Post by bgs_vb »

Hi,

I am getting following error, how to solve it.

J_Stage_PS_S_BUS_UNIT_RA_CRM..DRS_SRC_PS_BUS_UNIT_TBL_RA: [Oracle][ODBC][Ora]ORA-01861: literal does not match format string.

Regards,
Vindy
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Hi

This error occurs when you mistyped the formats especially in your datetime. Post your SQL it will give us more info.
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Poornagirija
Participant
Posts: 65
Joined: Fri Nov 19, 2004 12:00 am

Post by Poornagirija »

HI,
If you are trying to populate otherthan date data type in Date field you will get these type of errors.

if you are trying to populate @date but with timestamp data type you will get these error.
With Regards,
Poornagirija.

"Don't limit your challenges - challenge your limits"
bgs_vb
Premium Member
Premium Member
Posts: 79
Joined: Mon Jan 02, 2006 5:51 am

Post by bgs_vb »

My SQL output is like this:

how do i solve this...i tried by adding various formats but still it shows the error.

J_Stage_PS_S_BUS_UNIT_RA_CRM..DRS_SRC_PS_BUS_UNIT_TBL_RA: [Oracle][ODBC][Ora]ORA-01861: literal does not match format string

J_Stage_PS_S_BUS_UNIT_RA_CRM..DRS_SRC_PS_BUS_UNIT_TBL_RA: SQLExecDirect: Error executing statement 'SELECT Ltrim(Rtrim(BUSINESS_UNIT)),Ltrim(Rtrim(DESCR)),Ltrim(Rtrim(DESCRSHORT)),Ltrim(Rtrim(CURRENCY_CD)),Ltrim(Rtrim(BUSINESS_UNIT_RSF)),PRINTER_ID,ROW_ADDED_DTTM,Ltrim(Rtrim(ROW_ADDED_OPRID)),ROW_LASTMANT_DTTM,Ltrim(Rtrim(ROW_LASTMANT_OPRID)),SYNCID,SYNCDTTM FROM SYSADM.PS_BUS_UNIT_TBL_RA WHERE ROW_LASTMANT_DTTM > '1753-01-01 00:00:00'
OR ROW_LASTMANT_DTTM IS NULL '. See following database message for details.

Attempting to Cleanup after ABORT raised in stage J_Stage_PS_S_BUS_UNIT_RA_CRM..DRS_SRC_PS_BUS_UNIT_TBL_RA
Poornagirija
Participant
Posts: 65
Joined: Fri Nov 19, 2004 12:00 am

Post by Poornagirija »

HI, :D
I guess the problem is with the ROW_LASTMANT_DTTM field.
You are trying to do some comparison.
Check the data type of those fields.

If ROW_LASTMANT_DTTM is a date data type and your comparing that with timestamp then it will give that error.

Otherwise make ur query like the following for your date datatype
TO_CHAR(Tablename.ROW_LASTMANT_DTTM , 'YYYY-MM-DD HH24:MI:SS')

Hope this will help you.... :?
With Regards,
Poornagirija.

"Don't limit your challenges - challenge your limits"
Post Reply