PM78070: INCORROUT OF QUERY WITH EXCEPT WHEN IT RUNS AS A SUBQUERY.

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • This issue is about incorrout of  query with key word "except"
    when it runs as a subquery:
    
     eg:
    
    SELECT COUNT(*) FROM ( (SELECT * FROM T1) EXCEPT ALL
    (SELECT * FROM T2 WHERE ...) ) AS TEMP ;
    
    it runs as a subquery the count is higher.
    
    
    (SELECT * FROM T1) EXCEPT ALL (SELECT * FROM T2 WHERE...) ;
    
    returns expected results.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: DB2 for z/OS users with a query which        *
    *                 contains UNION, EXCEPT, EXCEPT ALL or ORDER  *
    *                 BY and whose top query block has exactly     *
    *                 one table.                                   *
    ****************************************************************
    * PROBLEM DESCRIPTION: A query may give incorrect output when  *
    *                      the query satisfies the conditions      *
    *                      below:                                  *
    *                                                              *
    *                      1.Top query block has exactly one       *
    *                        table.                                *
    *                      2.The query contains UNION, EXCEPT,     *
    *                        EXCEPT ALL or ORDER BY.               *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    A query may give incorrect output when the query contains
    UNION, EXCEPT, EXCEPT ALL or ORDER BY and its top query
    block has exactly one table.
    
    For example,
    
    SELECT *
    FROM
    (SELECT C1 FROM  T1
     UNION
     SELECT C1 FROM  T2) AS T3
    

Problem conclusion

  • The problems mentioned above are fixed so that DB2 will return
    correct results in that situation.
    
    
    ADDITIONAL KEYWORDS:
    
    SQLUNION SQLEXCEPT SQLEXCEPTALL SQLORDERBY SQLINCORR INCORROUT
    SQLINCORROUT DB2INCORR/K
    

Temporary fix

  • *********
    * HIPER *
    *********
    

Comments

APAR Information

  • APAR number

    PM78070

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-11-29

  • Closed date

    2013-01-21

  • Last modified date

    2013-09-26

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

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

    UK91069 UK91070

Modules/Macros

  •    DSNXOPRP
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RA10 PSY UK91069

       UP13/02/07 P F302

  • R910 PSY UK91070

       UP13/02/07 P F302

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

DB2 for z/OS

Software version:

910

Reference #:

PM78070

Modified date:

2013-09-26

Translate my page

Machine Translation

Content navigation