Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes Error in Procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error in Procedure" Watch "Error in Procedure" New topic
Author

Error in Procedure

ranjani kailasam
Greenhorn

Joined: Jul 05, 2011
Posts: 2
Hi I got the following error while executing my oracle procedure,
"PL S-00103 encountered the symbol @ when expecting one of the following."

I am using the following if else statement,
IF(@div_no== 8){ do this..)
ELSIF (@div_no== 9) (do this...)
ELSE raise no_div_no;

@div_no is the variable passed to this procedure.
Santhosh ayiappan
Ranch Hand

Joined: Jan 30, 2007
Posts: 80

Any specific reason to declare the variable as @div_no instead of div_no ?
Sudheer Bhat
Ranch Hand

Joined: Feb 22, 2011
Posts: 75
You cannot have @ as part of your variable declaration. Check this plsql delimiters
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1872
    
  16

ranjani kailasam wrote:
IF(@div_no== 8){ do this..)
ELSIF (@div_no== 9) (do this...)
ELSE raise no_div_no;

Is this supposed to be a PL/SQL stored procedure? Only asking because the code in your posting is not PL/SQL, so it's hardly surprising if the Oracle PL/SQL engine complains.


No more Blub for me, thank you, Vicar.
ranjani kailasam
Greenhorn

Joined: Jul 05, 2011
Posts: 2
Hi all.. thanks for the reply. I am new to PL\SQL programming. I just saw one example and put the '@' symbol in the condition. I will check after removing this one. thanks.
 
Consider Paul's rocket mass heater.
 
subject: Error in Procedure