Home » SQL & PL/SQL » SQL & PL/SQL » Problems on the procedure store
Problems on the procedure store [message #36987] Wed, 09 January 2002 04:52 Go to next message
paulo cunha
Messages: 1
Registered: January 2002
Junior Member
Why I can't do the following on my procedure?
Oracle return's warning on creation.

CREATE OR REPLACE PROCEDURE INSERT_ATTRIBUTE
( P_NAME VARCHAR2, P_SIZE NUMBER, P_TYPE VARCHAR2, P_TABLE_NAME VARCHAR2 )
AS

BEGIN

INSERT INTO DTABLE_X_DATTRIBUTE (ID, FK_DTABEL_ID, FK_DATTRIBUTE_ID)
VALUES (DTABE_X_DATTRIBUTEID.NEXTVAL,SELECT ID FROM DTABLE WHERE NAME=UPPER(P_TABLE_NAME); , DATTRIBUTEID.CURRVAL);

COMMIT;
END INSERT_ATTRIBUTE;
Re: Problems on the procedure store [message #36988 is a reply to message #36987] Wed, 09 January 2002 05:15 Go to previous message
kriser
Messages: 11
Registered: October 2001
Junior Member
Paulo

Your parameters need to be defined as IN, INOUT, or OUT.

Like this:

CREATE OR REPLACE PROCEDURE INSERT_ATTRIBUTE
( P_NAME IN VARCHAR2, P_SIZE IN NUMBER, P_TYPE IN VARCHAR2, P_TABLE_NAME IN VARCHAR2 )

Kyle
Previous Topic: raw datatype
Next Topic: Re: ORA-20000 ORU-10027
Goto Forum:
  


Current Time: Thu Aug 06 02:56:30 CDT 2020