IBM Support

IC79662: DB2 MIGHT GIVE A -901 ON QUERY WITH DISTINCT OUTER JOIN AND IS NULL PREDICATE

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • DB2 might give a -901 if the query satisfies the following
    conditions:
    
    1. The query has an outer join between base tables.
    2. The outer join has a DISTINCT.
    3. The output column list from outer join contains one or more
    columns from the null producing side.
    4. There is an IS NULL predicate above the outer join on the
    same column(s) as 3.
    
    eg.
    Select c1 from
    ( select DISTINCT t1.c1, t2.c2  < ------------- condition 2,3
      from t1 left join            <---------------- condition 1
              t2
      on t1.c1 = t2.c1) tmp(c1,c2)
    where tmp.c2 is null;      <--------------- condition 4
    
    SQL0901N  The SQL statement failed because of a non-severe
    system error.
    Subsequent SQL statements can be processed.  (Reason "Had
    troubles while
    removing an unreferenced QCL.".)  SQLSTATE=58004
    
    Stack:
    
    sqlnr_Manual2NativeAJ[85]
    sqlnr_optprep[125]
    sqlnr_optprep_action[100]
    sqlnr_comp[110]
    sqlnr_seq[100]
    sqlnr_rcc[100]
    sqlnr_exe[1200]
    sqlnn_cmpl[370]
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Please upgrade to DB2 version 970 fixpack 6                  *
    ****************************************************************
    

Problem conclusion

  • Problem is fixed in DB2 version 970 fixpack 6
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC79662

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-11-07

  • Closed date

    2012-06-06

  • Last modified date

    2012-06-06

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

    IC79641

  • 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

  • R970 PSN

       UP

  • R970 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC79662

Modified date: 06 June 2012