problem procedure [message #316769] |
Mon, 28 April 2008 05:03 |
rolmau
Messages: 18 Registered: March 2008 Location: UK
|
Junior Member |
|
|
Hi all
I am getting problem to run my pkg body
this is the code
CREATE OR REPLACE PACKAGE BODY pkg_roland IS
implementations Function and procedure
-----------------------------------------------------------------
PROCEDURE compute_discount(p_purchase_id IN NUMBER, p_discount_type_id IN NUMBER) AS v_result
NUMBER := 0;
v_percent NUMBER := 0;
v_message VARCHAR2(255);
-- Discount SELECT percent INTO v_percent FROM discount_type WHERE discount_type_id = p_discount_type_id;
BEGIN
IF v_percent IS NULL OR v_percent = 0 THEN no_discount_type_found; END IF;
-- Return Exception
no_data_found THEN v_message := 'No discount type found'; DBMS_OUTPUT.PUT_LINE(v_message);
WHEN no_discount_type_found THEN
v_message := 'No discount type found'; DBMS_OUTPUT.PUT_LINE(v_message); WHEN
no_record_of_purchase THEN v_message := 'No purchase record found'; DBMS_OUTPUT.PUT_LINE;
(v_message); END compute_discount;
error I am getting
PLS-00103: Encountered the symbol "AND" when expecting one of the
following:
:= . ( @ % ; not null range default character
Do they someone may help....
[Updated on: Mon, 28 April 2008 05:06] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: problem procedure [message #316825 is a reply to message #316811] |
Mon, 28 April 2008 08:31 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
rolmau wrote on Mon, 28 April 2008 14:36 | by closing brackets getting those error now
|
You probably put the closing parenthesis on the wrong line.
Now, for your next post: Please follow the RULES.
Use [code] and [/code] around your code.
|
|
|