Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Posts
    9

    Unanswered: problem with ElseIf

    Hi there,

    I have an IF statement in my code which is failing the compiler.
    I am on Oracle 9.2.0.4

    Code:
    if r_dist.dst_gl_dist_revclass IS NULL then
    v_matchCount:= v_matchcount;
    elseif r_wip.dsti_revenue_class = r_dist.dst_gl_dist_revclass then
    v_matchCount:= v_matchcount+1;
    else v_misMatch := 1;
    end if;
    the compiler returns:

    Code:
    Error report:
    ORA-06550: line 37, column 8:
    PLS-00103: Encountered the symbol "R_WIP" when expecting one of the following:
    
       := . ( @ % ;
    The symbol ":=" was substituted for "R_WIP" to continue.
    ORA-06550: line 37, column 43:
    PLS-00103: Encountered the symbol "THEN" when expecting one of the following:
    
       . ( * @ % & - + ; / at mod rem <an exponent (**)> and or ||
    Am I doing something fundamentally wrong here?

    thanks in advance,
    Matt

  2. #2
    Join Date
    Feb 2009
    Posts
    62
    The oracle Syntax is ELSIF, not ELSEIF

  3. #3
    Join Date
    Oct 2006
    Posts
    9
    hehe,
    thanks for that.
    posted this on ORAFAQ too, which you are aware about.
    needed a quick response so tried both forums!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •