2 Replies Latest reply: Feb 7, 2013 1:37 PM by Oracle's Mascot RSS

    If Statement Doesn't Work Inside Trigger After Upgrade to 11g

    Oracle's Mascot
      Gurus, is this intended functionality for IF statements to not work in 11g inside custom triggers? Before upgrading to 11g, the trigger worked perfectly. Please help.

      Thanks, Naveen Gagadam.


      Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
      PL/SQL Release 11.2.0.3.0 - Production
      CORE     11.2.0.3.0     Production
      TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
      NLSRTL Version 11.2.0.3.0 - Production
        • 1. Re: If Statement Doesn't Work Inside Trigger After Upgrade to 11g
          damorgan
          Of course not. The IF statement has nothing to do with whatever problem you are having.

          But not having your actual Oracle version number, or your code, or the full and complete exception stack, all we can do is marvel at the fact that you apparently didn't want us to help you fix the actual issue.
          orabase> select * from v$version;
          
          BANNER
          --------------------------------------------------------------------------------
          Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
          PL/SQL Release 11.2.0.3.0 - Production
          CORE    11.2.0.3.0      Production
          TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
          NLSRTL Version 11.2.0.3.0 - Production
          
          orabase> begin
            2       if TRUE = TRUE then
            3         dbms_output.put_line('It must be TRUE');
            4      end if;
            5  end;
            6  /
          It must be TRUE
          
          PL/SQL procedure successfully completed.
          Just wondering ... Did you consider trying this test yourself? Just put it into a trigger and it will work there too.
          • 2. Re: If Statement Doesn't Work Inside Trigger After Upgrade to 11g
            Oracle's Mascot
            Removed the IF statement and it works!