Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> ORA-01830 On Delete but not on Select?
Hello everyone,
I wonder if someone can shed some light on this. I have a table where the date is stored as a varchar2. The column is called datetime.
If I want to select all records more than 30 days ago with the following SQL, it works with no problem:
SELECT * FROM MFLOGBOOK WHERE TO_DATE(TRIM(DATETIME), 'DD.MM.YYYY HH24:MI:SS')+30 < TO_DATE('22.03.2007', 'DD.MM.YYYY')
However, if I want to delete them with
DELETE FROM MFLOGBOOK WHERE TO_DATE(TRIM(DATETIME), 'DD.MM.YYYY HH24:MI:SS')+30 < TO_DATE('22.03.2007', 'DD.MM.YYYY')
I get a
ORA-01830: date format picture ends before converting entire input string
The Database is Oracle 10g (10.2.0.1)
Any help is being appreciated
Jens Mohrmann Received on Thu Mar 22 2007 - 16:00:00 CDT
![]() |
![]() |