Link to home
Start Free TrialLog in
Avatar of akshay_sumeru
akshay_sumeru

asked on

ORA-01861 Error!!

Hi,


The following exception is caught while running my aplication.

-------------------------------------------------------
ORA-01861: literal does not match format string  
-------------------------------------------------------

The exception is caught while trying to insert data into a temporary table

The temporary table is created using the following query.
-------------------------------------------------------------------
CREATE GLOBAL TEMPORARY TABLE TempAvgDistRecords  
(
PROJEKTID NUMBER,
FIRMAID VARCHAR(20),
GEBIETID VARCHAR(20),
DATUM DATE,
DATUMVON DATE,
DATUMBIS DATE
)
-------------------------------------------------------------------



Query which fetches data is as follows
------------------------------------------------------------------------------------------------------------------
SELECT DISTINCT PJDT.PROJEKTID, PJDT.FIRMAID, PJDT.DATUM, PJVS.GEBIETID, PJVS.DATUMVON,
PJVS.DATUMBIS FROM PJDT, PJVS,GB, GBSU WHERE PJDT.PROJEKTID = PJVS.PROJEKTID
AND PJDT.FIRMAID = PJVS.FIRMAID  AND GB.GEBIETID = PJVS.GEBIETID AND
GB.GEBIETID = GBSU.GEBIETID AND (GBSU.SUBJEKTIDPE = 'pe01293')
AND (PJDT.DATUM BETWEEN '01-Jul-2006' and '19-Jul-2006')}
-------------------------------------------------------------------------------------------------------------------










The output of the above query is as follows:

------------------------------------------------------------------------------------------------
PROJEKTID FIRMAID              DATUM     GEBIETID             DATUMVON
---------- -------------------- --------- -------------------- ---------
DATUMBIS
---------
      7714 4                    01-JUL-06 011-000-000-201-0009 01-JAN-00
31-DEC-99

      7714 4                    08-JUL-06 011-000-000-201-0009 01-JAN-00
31-DEC-99

      7714 4                    15-JUL-06 011-000-000-201-0009 01-JAN-00
31-DEC-99


 PROJEKTID FIRMAID              DATUM     GEBIETID             DATUMVON
---------- -------------------- --------- -------------------- ---------
DATUMBIS
---------
      7742 4                    11-JUL-06 011-000-000-201-0009 01-JAN-00
31-DEC-99
---------------------------------------------------------------------------------

The “ORA-01861: literal does not match format string”  exception  is caught while trying to insert the above output data into the Temporary Table which have been created in the beginning.

Can anyone resolve this issue???


Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

AND (PJDT.DATUM BETWEEN TO_DATE('01-Jul-2006' , 'DD-MON-YYYY') and to_date('19-Jul-2006', 'DD-MON-YYYY') )
Avatar of akshay_sumeru
akshay_sumeru

ASKER

!!!!
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial