Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-06550: When execute pl/sql Function .

DevM3Jul 14 2016 — edited Jul 14 2016

Hello All,

I have a DB Function inside a DB Package . the function a follow :

FUNCTION CHECKUSERNATIONALITY(P_USER_ID NUMBER) RETURN NUMBER

IS

NT VARCHAR2(20);

BEGIN

SELECT NATIONALITY

INTO NT

FROM USERS

WHERE USER_ID = P_USER_ID;

IF (NT='A')

THEN

RETURN 1;

ELSE

RETURN 0;

END IF;

END;

when I execute it in toad as follow:

BEGIN

PACKAGEName.CHECKUSERNATIONALITY(P_USER_ID=100);

END;

- I got the following error

[Error] Execution (5: 42): ORA-06550: line 2, column 42:

PLS-00201: identifier 'P_USER_ID' must be declared

ORA-06550: line 2, column 2:

PL/SQL: Statement ignored

This post has been answered by Saubhik on Jul 14 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 11 2016
Added on Jul 14 2016
7 comments
882 views