IBM Support

IC80769: QUERIES WITH ORDER BY AND OUTER JOINS MAY RETURN SQL1585N

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Queries with ORDER BY and Outer Joins where the ON clause of
    some (or all) of the
    Outer Joins contains predicates of the form (1=0) or predicates
    that can be
    proved it is always false may return SQL1585N. Such queries
    requires the width of the rows,
    the sum of the length of all the columns in the SELECT clause,
    exceeding the largest pagesize
    of the system temporary tablespace.
    

Local fix

  • Remove unnecessary ORDER BY columns deriving from the right
    table of the LEFT OUTER JOIN
    (or the left table of the RIGHT OUTER JOIN) that contains the
    false predicate in the ON clause.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Queries with ORDER BY and Outer Joins where the ON clause of *
    * some (or all) of the                                         *
    * Outer Joins contains predicates of the form (1=0) or         *
    * predicates                                                   *
    * that can be                                                  *
    * proved it is always false may return SQL1585N. Such queries  *
    * requires the width of the rows,                              *
    * the sum of the length of all the columns in the SELECT       *
    * clause,                                                      *
    * exceeding the largest pagesize                               *
    * of the system temporary tablespace.                          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 UDB version 9.7 fixpack 6.                    *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in DB2 UDB Version 9.7 Fix Pack 6.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC80769

  • 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

    2012-01-10

  • Closed date

    2012-06-11

  • Last modified date

    2012-06-11

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

    IC80744

  • 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



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC80769

Modified date: 11 June 2012