IBM Support

IT24702: THE EXPLANATION FOR SQL0338N NEEDS AN UPDATE AFTER THE ENHANCEMENT MADE SINCE 10.1 TO ALLOW SUBQUERIES IN AN ON CLAUSE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • ## Problem description
    The Explanation for SQL0338N needs to be updated after an
    enhancement has been made since 10.1 to allow subqueries in an
    ON clause under some circumstances.
    
    ## How to reproduce the problem
    The following query returns SQL0338N in 9.7, but succeeds in
    10.1 onward.
    It's because there is an enhancement made since 10.1. The
    explanation of SQL0338N in 10.1 onward is still the same as in
    9.7 and therefore a bit misleading to the user.
    ----------------------------------
    CREATE TABLE TEST01(C1 INTEGER);
    CREATE TABLE TEST02(C1 INTEGER);
    CREATE TABLE TEST03(C1 INTEGER);
    
    INSERT INTO TEST01 VALUES(1);
    INSERT INTO TEST02 VALUES(1);
    INSERT INTO TEST03 VALUES(1);
    
    SELECT *
    FROM TEST01 T1
    LEFT OUTER JOIN TEST02 T2
    ON T1.C1 = T2.C1
    AND T2.C1 = (SELECT C1 FROM TEST03);
    ----------------------------------
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.1 Mod 4 Fixpack 4 or higher                *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 11.1 Mod 4 Fixpack 4
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT24702

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-04-11

  • Closed date

    2018-11-27

  • Last modified date

    2018-11-27

  • APAR is sysrouted FROM one or more of the following:

    IT23694

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
27 November 2018