Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in Procedure

 
ranjani kailasam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 80
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any specific reason to declare the variable as @div_no instead of div_no ?
 
Sudheer Bhat
Ranch Hand
Posts: 75
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot have @ as part of your variable declaration. Check this plsql delimiters
 
chris webster
Bartender
Posts: 2407
32
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
ranjani kailasam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic