Operation Code Description for DB2 data type conversion

Source: Internet
Author: User

This article mainly describes the actual operation steps of DB2 data type conversion. First, we will introduce the actual operation code of DB2 data type conversion to introduce the operation steps of DB2 data type conversion, the following is a detailed description of the main content of the article. I hope you will have a better understanding of it after browsing.

DB2 data type conversion:

 
 
  1. Money is an Integer ----> char (money)
  2. Char -------> Integer (trim (char (money )))
  3. Money is double (8, 2) double -----> char (cast (money as decimal (8, 2 )))
  4. Char -------> double cast (char (cast (a. money as decimal (8, 2) as decimal (8, 2) as double)
  5. The value of money is decimal (8, 2) decimal -------> char Digits (money)
  6. Char -------> decimal cast (Digits (money) as decimal (8, 2 ))
  7. Money is date ------> char (money)
  8. Char ------> date (trim (char (money )))
  9. Money is bigint ----> char (money)
  10. Char -----> bigint cast (char (money) as bigint)

This is what I encountered during the project process: a trigger is used to save the deleted or modified data to an xml column. It is required for group strings. I spent one morning searching for documents and experimenting. Many introductions on the Internet are too general and not applicable. If there are any errors, please point out that if you still need to add, or if you think it is important, you can notify me, I will add. Thank you!

The above content is an introduction to DB2 data type conversion. I hope you will find some gains.

Related Article

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.