IBM Support

IT24750: SQL0901/SQL0183 MIGHT OCCUR WHEN RUNNING QUERIES CONTAINING CASESUB-EXPRESSIONS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • SQL0901 might occur when running queries containing the
    following characteristics on column organized tables:
    
    1. the select list contains at least one expression
    2. the expression contains CASE sub-expresssion
    3. the result data type of the CASE sub-expression is different
    from the result data type of the expression
    
    For non column organized table it may manifest as SQL0183 when
    calling DATE function with CASE statement:
    
    create table t1 (c1 timestamp not null);
    select int(date(case when 1=1 then c1 end)) from t1;
    
    1
    -----------
    SQL0183N  A datetime arithmetic operation or a datetime scalar
    function has a
    result that is not within the valid range of dates.
    SQLSTATE=22008
    

Local fix

  • Work-around:
    DB2COMPOPT=NO_SIMPL_CASE_HXP
    

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

    IT24750

  • 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-17

  • Closed date

    2020-01-28

  • Last modified date

    2020-01-28

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

  • 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

[{"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:
28 January 2020