IBM Support

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

Subscribe

You can track all active APARs for this component.

 

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

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
04 May 2022