Problem In Stored procedure
CREATE OR REPLACE PROCEDURE sp_Validate_TypeAcc
(
pr_Acc_Type varchar2,
pr_Acc_No varchar2,
pr_Use varchar2,
pr_Valid out number
)
IS
N VARCHAR2(10);
BEGIN
SELECT ACC_NO INTO N
FROM TBL_ACC_MASTER
WHERE Acc_Type = pr_Acc_type AND
Acc_No = pr_Acc_No;
IF (N = '') THEN
IF (pr_Use = 'New') THEN
pr_Valid := 1;
ELSEIF (pr_Use = 'Existing')THEN
pr_Valid := 0;
ENDIF;
ELSE
IF (pr_Use = 'New') THEN
pr_Valid := 0;
ELSEIF (pr_Use = 'Existing')THEN
pr_Valid := 1;
ENDIF;
ENDIF;
END;
I Use this kind of stored rocedure to check the validity.
this procedure gives me error like
20/31 PLS-00103: Encountered the symbol "THEN" when expecting one of th e following: := . ( % ;
26/31 PLS-00103: Encountered the symbol "THEN" when expecting one of th e following: := . ( % ;
31/4 PLS-00103: Encountered the symbol ";" when expecting one of the f ollowing: if
Can any one help me with this ?
This is very urgent for me...
|