Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: help with simple stored procedure creation

Re: help with simple stored procedure creation

From: Kin Ng <kin_ng5_at_yahoo.com>
Date: 11 Jul 2002 16:18:59 -0700
Message-ID: <d5b3f600.0207111518.7553d646@posting.google.com>


Thanks. Oracle can't even produce a decent compiler.

"Roman Mirzaitov" <rmirzaitov_at_kt.kg> wrote in message news:<agdjk9$krv44$1_at_ID-127142.news.dfncis.de>...
> Hi,
>
> replace
> temp := "";
> with
> temp:=''; (single quotes).
>
> Besides, I recommend replace sustr() with substr() unless it's your own
> defined function.
>
> Regards,
> --
> Roman Mirzaitov
> Brainbench MVP for Oracle Administration
> www.brainbench.com
>
> "Kin Ng" <kin_ng5_at_yahoo.com> wrote in message
> news:d5b3f600.0207081626.f69500e_at_posting.google.com...
> > Can any body tell me why I can't create this sp?
> >
> > CREATE OR REPLACE PROCEDURE bulk_insert_attr_val_combo (
> > p varchar2
> > )
> >
> > AS
> >
> > combo varchar2(10) := '1,2,3,';
> > temp varchar2(20) := '';
> >
> >
> > BEGIN
> >
> > for i in 1..LENGTH(combo) loop
> > if substr(combo,i,1) = ',' then
> > insert into attr_val_combo values(temp);
> > temp := "";
> > else
> > temp := temp || sustr(combo,i,1);
> > end if;
> > end loop;
> >
> > COMMIT;
> > END;
> > /
> >
> > I got this error message from SQL plus
> >
> > CREATE OR REPLACE PROCEDURE bulk_insert_attr_val_combo (
> > *
> > ERROR at line 1:
> > ORA-00604: error occurred at recursive SQL level 1
> > ORA-01400: cannot insert NULL into ("SYS"."OBJ$"."NAME")
Received on Thu Jul 11 2002 - 18:18:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US