Home > database >  Stored procedure execution error
Stored procedure execution error

Time:10-03

I stored procedure is a small white, first-time, wrote a short stored procedure, when found to perform an error, the great god help to look at, exactly what is going wrong,
 create or replace PROCEDURE XX_P_ORL_ATT20_UPDATE (OR_GID IN VARCHAR2) 
AS
CURSOR ORL_GID_CUR
IS
The SELECT ORL. ORDER_RELEASE_LINE_GID
The FROM ORDER_RELEASE_LINE ORL
WHERE ORL. ORDER_RELEASE_GID=OR_GID
ORL_GID_ROW ORL_GID_CUR % ROWTYPE;
The BEGIN
FOR ORL_GID_ROW ORL_GID_CUR IN
LOOP
The UPDATE ORDER_RELEASE_LINE ORL
The SET ORL. ATTRIBUTE20=
(the SELECT XORLE EXTEND_TEXT1
The FROM XX_ORDER_RELEASE_LINE_EXTEND XORLE
WHERE XORLE. ORDER_RELEASE_LINE_GID=ORL_GID_ROW. ORDER_RELEASE_LINE_GID
)
WHERE ORL. ORDER_RELEASE_LINE_GID=ORL_GID_ROW. ORDER_RELEASE_LINE_GID
END LOOP;
COMMIT;
END;

CodePudding user response:

that execution error when

Specific error coming, may be a syntax error, may also be a semantic error;

CodePudding user response:

- ORL_GID_ROW ORL_GID_CUR % ROWTYPE; This line not to,
The BEGIN
FOR ORL_GID_ROW ORL_GID_CUR - here IN used directly is ok, don't have to define

CodePudding user response:

Yes, the specific error to post

CodePudding user response:

refer to the second floor wmxcn2000 response:
- ORL_GID_ROW ORL_GID_CUR % ROWTYPE; This line not to,
The BEGIN
FOR ORL_GID_ROW ORL_GID_CUR - here IN used directly is ok, don't have to define


Checked again in the afternoon, found that the stored procedure itself performs no problem, but in another system call will be an error,

Ask the colleague, colleagues need to add synonyms to a stored procedure, to make calls,

Could you tell me how to add synonyms to those stored procedures to?

CodePudding user response:

The
reference 3 floor cjp20160817 response:
yes, specific error to stick out the


Checked again in the afternoon, found that the stored procedure itself performs no problem, but in another system call will be an error,

Ask the colleague, colleagues need to add synonyms to a stored procedure, to make calls,

Could you tell me how to add synonyms to those stored procedures to?

CodePudding user response:

Create a synonym for
The create
- or replace
Synonym synonym name
For the name of the table;

Note: the name of the table you are the corresponding user, pay attention to you by the corresponding query this table permissions
For example, create a user table TAB under user_a synonyms syn_tab

The create or replace
Synonym syn_tab for user_a. TAB
  • Related