IBM Support

IT20090: DATE_TRUNC SCALAR FUNCTION RETURNS UNWANTED FRACTIONAL SECONDS WITH SCALE 4 WHEN SECOND INPUT ARGUMENT IS DATE TYPE.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • DATE_TRUNC scalar function returns unwanted fractional seconds
    with scale 4 when second input argument is DATE type. For e.g.
    
    create or replace variable D date default '08/07/2008'
    DB20000I  The SQL command completed successfully.
    
    On Linux
    describe values date_trunc('DAY',D)
    
     Column Information
    
     Number of columns: 1
    
     SQL type              Type length  Column name
    Name length
     --------------------  -----------
    ------------------------------  -----------
     393   TIMESTAMP                19  1
    1
    
    
    values date_trunc('DAY',D)
    
    1
    -------------------
    2008-08-07-00.00.00
    
      1 record(s) selected.
    
    On AIX
    describe values date_trunc('DAY',D)
    
     Column Information
    
     Number of columns: 1
    
     SQL type              Type length  Column name
    Name length
     --------------------  -----------
    ------------------------------  -----------
     393   TIMESTAMP                24  1
    1
    
    
    values date_trunc('DAY',D)
    
    1
    ------------------------
    2008-08-07-00.00.00.0000
    
      1 record(s) selected.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 11.1 MP1 FP2 or higher                        *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 11.1 MP1 FP2
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT20090

  • 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

    2017-04-06

  • Closed date

    2017-06-23

  • Last modified date

    2017-06-23

  • 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"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
29 June 2020