2 Replies Latest reply: Mar 13, 2014 7:23 AM by Matt Schulz RSS

    Bug - Outline Window can't handle "UNPIVOT INCLUDE NULLS" (v. 4.0.1.14)

    Matthias Schulz

      SQL-Developer has a problem with the command "UNPIVOT INCLUDE NULLS", when used in PL/SQL packages.

      This problem still exists in version 4.0.1.14 Build 14.48

       

      When the command  "UNPIVOT INCLUDE NULLS" is used, the Outline window shows nothing, or something strange.

       

      Example

      create or replace PACKAGE BODY bug_demonstration

      IS

          PROCEDURE unpivot_no_nulls

          IS

              l_city  VARCHAR2(4000);

          BEGIN

              SELECT c_val

                INTO l_city

                FROM (SELECT 'Long Road' AS street, 'New Port' AS city FROM DUAL)

                     UNPIVOT (c_val FOR c_key IN (street, city))

               WHERE c_key = 'CITY';

          END unpivot_no_nulls;   

       

          PROCEDURE unpivot_include_nulls

          IS

              l_city  VARCHAR2(4000);

          BEGIN

              SELECT c_val

                INTO l_city

                FROM (SELECT 'Long Road' AS street, 'New Port' AS city FROM DUAL)

                     UNPIVOT

                     INCLUDE NULLS

                     (c_val FOR c_key IN (street, city))

               WHERE c_key = 'CITY';

          END unpivot_include_nulls;      

       

      END bug_demonstration;


      The above example leads to a strange display in the Outline window:

       

      Outline

      BUG_DEMONSTRATION Body

      • l_city

       

       

      When "INCLUDE NULLS" in procedure "unpivot_include_nulls" is commented out the Outline window works as expected:

       

      Outline

      BUG_DEMONSTRATION Body

      • unpivot_no_nulls
      • unpivot_include_nulls

       

      Best Regards,

      Matthias Schulz