home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IT02275 Status: Closed

LPAD() AND RPAD() FUNCTION WITH EMPTY STRING CAUSES THE RESULT STRING TO BE
PADDED WITH '00' CHARACTERS

product:
DB2 FOR LUW / DB2FORLUW / A50 - DB2
Problem description:
Calling LPAD() and RPAD() function with an empty string '' (pad, 
third parameter) results in a output string with right padded 
with '00'`s characters up to the length provided. The resulting 
varchar string is padded with '00' chars which should not 
happen. 
 
Example: 
 
select LPAD('AAAAA', 10, '') AS F1 from sysibm.sysdummy1 
 
F1 
---------- 
AAAAA 
 
  1 record(s) selected. 
 
 
 
select HEX(LPAD('AAAAA', 10, '')) AS F1 from sysibm.sysdummy1 
 
F1 
-------------------- 
41414141410000000000 
 
  1 record(s) selected. 
 
 
If the pattern (third argument of L/RPAD()) is an empty string 
'', then we should return the result without any padding.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 10.5 Fix Pack 5.                      * 
****************************************************************
Local Fix:
Solution
First fixed in DB2 Version 10.5 Fix Pack 5.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
05.06.2014
15.12.2014
15.12.2014
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.5.0.5 FixList