SQL ISNULL and sqlisnull
Replace NULL with the specified value.
ISNULL is used to determine the value you intend to replace when the selected column is null.
ISNULL (check_expression, replacement_value)
Select case when m. [end date] is null then 1900 else year (m. [settlement date]) end as settlement details _ settlement year, ISNULL (m. [payment amount], 0) cooperative settlement details _ payment amount, ISNULL (m. [actual payment], 0) cooperative settlement details _ actual payment, m. [single item number], m. [Department] as cooperative settlement details _ department, ISNULL (m. [actual payment], 0)-ISNULL (m. [payment amount], 0) cooperative settlement details _ still need to pay FROM [BI _ cooperative settlement details _ FOR_ANALYSE] as m
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.