COALESCE

4D - Documentation   Français   English   German   Japanese   4D SQL Reference, Table of Contents   4D SQL Reference, Index   Back   Previous   Next

version 11


COALESCE (arithmetic_expression_commalist)

Description

The COALESCE function returns the first non-null expression from the list of arithmetic_expression type arguments passed. It will return NULL if all the expressions passed are NULL.

Example

This example returns all the invoice numbers from 2007 where the VAT is greater than 0:

   SELECT INVOICE_NO
     FROM INVOICES
    WHERE EXTRACT(YEAR(INVOICE_DATE)) = 2007
     HAVING (COALESCE(INVOICE_VAT;0) > 0)

4D - Documentation   Français   English   German   Japanese   4D SQL Reference, Table of Contents   4D SQL Reference, Index   Back   Previous   Next