V95 and V97 char methods, numeric display inconsistent format issues.

Source: Internet
Author: User
Tags db2 connect db2 connect to

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.