error message - syntax failure? [message #80045] |
Wed, 07 August 2002 03:18 |
kat
Messages: 15 Registered: February 2000
|
Junior Member |
|
|
hello !
I have a problem with a procedure i've written!
I want to insert dates into a table. therfore I have a from-date and a to-date. every day between these dates should be written in the table!
create or replace procedure Create_calendar (datefrom in out VARCHAR2, dateto in out VARCHAR2)
IS
BEGIN
while to_date(datefrom , 'mm/dd/yyyy') <= to_date(dateto , 'mm/dd/yyyy') loop
INSERT INTO KALENDER ( dt, status) VALUES ( to_date(datefrom , 'mm/dd/yyyy') , 'asdf');
datefrom := to_char(to_date( datefrom , 'mm/dd/yyyy') + 1);
end loop;
END Create_Kalender;
So thats what i've done so far. but this error messages always pops up and I don't know where the mistake is.
ORA-01858: a non-numeric character was found where a numeric was expected
ORA-06512: at "IMORDB.CREATE_CALENDAR", line 6
ORA-06512: at line 9
could you please help me?
thank you !
kat
|
|
|
|