IBM Support

IC93926: TO_CHAR( CHARACTER-EXPRESSION, FORMAT-STRING ) RETURNS SQL20447N IN VARCHAR2 COMPATIBILITY MODE

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • In VARCHAR2 compatibility mode, calling TO_CHAR(
    character-expression, format-string ) should implicitly cast the
    first argument to a number and perform numeric to string
    conversion using the format string provided.
    Instead, the first argument is implicitly cast to a timestamp
    and the second argument is assumed to be a timestamp format
    string.
    This is likely to result in SQLCODE SQL20447N and SQLSTATE
    22007.
    

Local fix

  • Explicitly cast the first argument to a numeric data type
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 UDB version 9.7 fixpack 9.                    *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in DB2 UDB Version 9.7 FixPack 9
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC93926

  • 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

    2013-07-04

  • Closed date

    2013-12-23

  • Last modified date

    2014-05-07

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

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

    IC94356 IC95554

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 #: IC93926

Modified date: 07 May 2014