IBM Support

IC97475: CLPPLUS DISPLAYS INCORRECT RESULT WHEN MORE THAN ONE LIKE CLAUSE IS SPECIFIED IN A SELECT STATEMENT

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • CLPPLus displays different result sets only when I change the
    predicate order within the where clause for character columns
    selected with LIKE '%1' or LIKE '%2'.
    
    SQL> create table test1 ( i int , text varchar(10) ) ;
    
    DB250000I: Der Befehl wurde erfolgreich ausgefチhrt.
    
    SQL> insert into test1 values (1, 'Text1'), (2, 'Text2') ;
    
    DB250000I: Der Befehl wurde erfolgreich ausgefチhrt.
    
    SQL> select * from test1 where i = 1 or i = 2 ;
    
              I TEXT
    ----------- ----------
              1 Text1
              2 Text2                              CORRECT RESULT
    ROWS!
    
    SQL> select * from test1 where text like '%1' or text like '%2'
    ;
    
              I TEXT
    ----------- ----------                         INCORRECT
    RESULTSET!!!
             1 Text1                                   => ONLY Row
    (1, ?Text1?) is returned and not (2, ?Text2?) -> Must also
    displayed in the result set
    
    SQL> select * from test1 where text like '%2' or text like '%1'
    ;
    
              I TEXT
    ----------- ----------                         INCORRECT
    RESULTSET!!!
              2 Text2                                   => ONLY Row
    (2, ?Text2?) is returned and not (1, ?Text1?) -> Must also
    displayed in the result set
    
    
    
    
    When the same SQLs are issued on the command line or Data Studio
    the results are correct!
    
    db2blu01@vmdb202:~> db2 "select * from test1 where i = 1 or i =
    2 "
    
    I           TEXT
    ----------- ----------
              1 Text1
              2 Text2
    
      2 record(s) selected.
    
    db2blu01@vmdb202:~> db2 "select * from test1 where text like
    '%1' or text like '%2' "
    
    I           TEXT
    ----------- ----------
              1 Text1
              2 Text2
    
      2 record(s) selected.
    
    db2blu01@vmdb202:~> db2 "select * from test1 where text like
    '%2' or text like '%1' "
    
    I           TEXT
    ----------- ----------
              1 Text1
              2 Text2
    
      2 record(s) selected.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * CLPPlus on all platforms                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.7 Fix Pack 9.                       *
    ****************************************************************
    

Problem conclusion

  • First fixed in Version 9.7 Fix Pack 9.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC97475

  • 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-11-07

  • Closed date

    2013-12-16

  • Last modified date

    2013-12-16

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

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

    IC97838 IC97852

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

Modified date: 16 December 2013