DB2 VALUE functions

Source: Internet
Author: User
Tags db2 value function

DB2 VALUE function www.2cto.com Syntax: VALUE (EXPRESSION1, EXPRESSION2) VALUE function is to return a non-empty VALUE, when the first parameter is not empty, directly return the value of this parameter. If the first parameter is null, the value of the first parameter is returned. Select value (ID, '') FROM T1 indicates that if T1.ID is null, an empty string is returned. If T1.ID is not empty, T1.ID is returned. When you need to calculate the field value, for example, www.2cto.com where amt1 + amt2> 0, if the value amt1 or amt2 is NULL, the result is wrong, and the value function is displayed. Where value (amt1, 0) + value (amt2, 0)> 0.
 

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.