Home » Developer & Programmer » Forms » error message - syntax failure?
error message - syntax failure? [message #80045] Wed, 07 August 2002 03:18 Go to next message
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
Re: error message - syntax failure? [message #80050 is a reply to message #80045] Wed, 07 August 2002 12:07 Go to previous message
ram kumar
Messages: 113
Registered: August 2002
Senior Member
hi,
whcih form does the datefrom,dateto parameters..i mean what format of data is it same as mm/dd/yyyy..
other wise you get the error..
Previous Topic: Help needed in installation of FormsDeveloper and Reports
Next Topic: In a procedure have more than one sql statments to run,how to control thire exception?
Goto Forum:
  


Current Time: Sat Apr 20 09:12:50 CDT 2024