Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 9th, 2005, 03:48 AM
Authorized User
 
Join Date: Mar 2004
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mistry_bhavin
Default 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...

 
Old October 11th, 2005, 05:15 AM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to engr_rbugcalao@yahoo.com
Default

Hello,
   Replace EndIf with End If. That should do the trick.
:)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with stored procedure analuz ADO.NET 1 July 18th, 2007 08:33 AM
Stored procedure problem akumarp2p Reporting Services 1 May 29th, 2007 01:25 AM
Stored Procedure Problem kwilliams SQL Server 2000 7 June 23rd, 2006 03:03 PM
Stored procedure problem dkspivey SQL Language 2 February 6th, 2006 01:44 PM
Stored Procedure Problem brettdavis4 ASP.NET 1.0 and 1.1 Basics 7 November 3rd, 2003 09:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.