db2v9.5:
DB2 Connect to sample
Database Connection Information
Database Server = db2/aix64 9.5.7
SQL Authorization ID = w95q7a
Local Database alias = SAMPLE
DB2 "Values char (DEC (123))"
1
-------------
00000000123.
1 record (s) selected.
db2v9.7:
DB2 Connect to sample
Database Connection Information
Database Server = db2/aix64 9.7.7
SQL Authorization ID = e97q7a
Local Database alias = SAMPLE
DB2 "Values char (DEC (123))"
1
-------------
123
1 record (s) selected.
Solve:
Sets the DEC_TO_CHAR_FMT parameter.
DB2 Update DB CFG using DEC_TO_CHAR_FMT V95
Db20000i the UPDATE DATABASE CONFIGURATION command completed successfully.
sql1363w one or more of the parameters submitted for immediate modification
were not changed dynamically. For these configuration parameters, the database
Must be shutdown and reactivated before the configuration parameter changes
Become effective.
Db2stop Force
Db2start
DB2 Connect to sample
DB2 "Values char (DEC (123))"
1
-------------
00000000123.
1 record (s) selected.
DEC_TO_CHAR_FMT:
The setting of the parameter determines whether leading zeros and a trailing decimal characters is included in the result of the CHAR function. If you set the parameter to NEW, leading zeros and a trailing decimal characters is not included; If you set the parameter to V95, leading zeros and a trailing decimal characters is included.
When upgrading, for databases created before version 9.7 and then upgraded to Version 9.7 or higher, the parameter dec_to_ CHAR_FMT is set to V95 by default.
V95 and V97 char methods, numeric display inconsistent format issues.