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 -> help with simple stored procedure creation

help with simple stored procedure creation

From: Kin Ng <kin_ng5_at_yahoo.com>
Date: 8 Jul 2002 17:26:09 -0700
Message-ID: <d5b3f600.0207081626.f69500e@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 Mon Jul 08 2002 - 19:26:09 CDT

Original text of this message

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