Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00103
PLS-00103 [message #305499] Tue, 11 March 2008 01:32 Go to next message
sumedh7
Messages: 31
Registered: March 2007
Location: Pune,India
Member
I'm getting error while executing below package please suggest Shocked


create or replace package bonus is g_max_bonus :=.99;
function calc_bonus(p_emp_id number)
return number;
function calc_salary(p_emp_id number)
return number;
end;
/

ng: Package created with compilation errors.

show errors;
s for PACKAGE BONUS:

COL ERROR
--- -----------------------------------------------------------------
PLS-00103: Encountered the symbol "=" when expecting one of the
following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table LONG_ double ref
char time timestamp interval date binary national character
nchar
The symbol "<an identifier>" was substituted for "=" to continue.
Re: PLS-00103 [message #305502 is a reply to message #305499] Tue, 11 March 2008 01:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is the type of "g_max_bonus"?

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Always post your Oracle version (4 decimals).

Regards
Michel
Re: PLS-00103 [message #305504 is a reply to message #305502] Tue, 11 March 2008 01:43 Go to previous messageGo to next message
sumedh7
Messages: 31
Registered: March 2007
Location: Pune,India
Member
datatype is number
Re: PLS-00103 [message #305510 is a reply to message #305499] Tue, 11 March 2008 02:07 Go to previous messageGo to next message
kecd_deepak
Messages: 52
Registered: December 2007
Member
You didn't provide data type for variable g_max_bonus.

create or replace package bonusq is
g_max_bonus NUMBER :=.99;
function calc_bonus(p_emp_id number)
return number;
function calc_salary(p_emp_id number)
return number;
end;
/
Re: PLS-00103 [message #305511 is a reply to message #305504] Tue, 11 March 2008 02:08 Go to previous messageGo to next message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
datatype is number

So tell it to Oracle.

Regards
Michel
icon14.gif  Re: PLS-00103 [message #305513 is a reply to message #305511] Tue, 11 March 2008 02:19 Go to previous messageGo to next message
sumedh7
Messages: 31
Registered: March 2007
Location: Pune,India
Member
Dear Sir,
Thank You for valueable suggestion.
Re: PLS-00103 [message #305517 is a reply to message #305510] Tue, 11 March 2008 02:40 Go to previous message
sumedh7
Messages: 31
Registered: March 2007
Location: Pune,India
Member
Thanks Deepak,

Problem has been resolved....! Smile
Previous Topic: How to return sysdate in required format?
Next Topic: update query
Goto Forum:
  


Current Time: Fri Dec 02 12:02:35 CST 2016

Total time taken to generate the page: 0.06559 seconds