Click here to Skip to main content
14,425,330 members
Rate this:
Please Sign up or sign in to vote.
See more:
Dear all

I have written one store procedure in oracle as follows
CREATE OR REPLACE PACKAGE ESUPPORT.DEPARTMENT AS
           TYPE  CURSOR_TYPE IS REF CURSOR;
          PROCEDURE GET_EMPS (O_RESULT_SET OUT CURSOR_TYPE);
        END;
/
CREATE OR REPLACE PACKAGE BODY ESUPPORT.DEPARTMENT AS
PROCEDURE GET_EMPS (O_RESULT_SET OUT CURSOR_TYPE)
AS
          BEGIN
             OPEN O_RESULT_SET FOR
             SELECT * FROM ESUPPORTV_HR_EMP_DATA_FINAL ;
           END;
END;
/



While I am trying to execute it, in toad for oracle
It shows below error:

ORA-06550: line 1, column 11:
PLS-00103: Encountered the symbol "DEPARTMENT" when expecting one of the following:

   := . ( @ % ;
The symbol ":=" was substituted for "DEPARTMENT" to continue.


Can anybody help me??

Thank you in advance.

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 22-Oct-13 22:06pm
v3
Comments
OriginalGriff 23-Oct-13 3:06am
   
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
Richard MacCutchan 23-Oct-13 3:22am
   
Remove the period in ESUPPORT.DEPARTMENT and replace with a valid character.
Mahesh Devikar 23-Oct-13 3:57am
   
Yes its a schema name but when i was trying to ommit it, it wont allow me.

i have tried to create another package using different name but when i save it it will automatically takes schema name with it.

Please guide.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

The schemaname should not be a part of the package definition. So if ESUPPORT is the schemaname it should be omitted.
That was not correct.
The schemaname is necessary when creating a package in the schema of an other user
CREATE OR REPLACE PACKAGE DEPARTMENT ...
   
v2
Comments
Mahesh Devikar 23-Oct-13 3:56am
   
Yes its a schema name but when i was trying to ommit it, it wont allow me.

i have tried to create another package using different name but when i save it it will automatically takes schema name with it.

Please guide.
Jörgen Andersson 23-Oct-13 6:35am
   
Is ESUPPORT the correct schemaname?
And do you have permissions to create packages on it?

If ESUPPORT is not a correct schemaname or if you are not having permissions on it, the parser will try to create a package with the name ESUPPORT instead, and then the .DEPARTMENT is wrong.
Mahesh Devikar 23-Oct-13 22:54pm
   
Yes,ESUPPORT is correct Schema name & i have permission to create package on it.

I have compiled Package it shows no error

but when i execute it in Toad it shows above error.

Can you once again confirm me execution syntax in Toad.
Jörgen Andersson 24-Oct-13 2:02am
   
Then I have misunderstood your problem. Can you please update your question with how you call your stored procedure, as that is where the error happens.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100