4D v14

COALESCE

Home

 
4D v14
COALESCE

COALESCE  


 

 

Commande COALESCE

COALESCE (arithmetic_expression, ..., arithmetic_expression)

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)

 
PROPERTIES 

Product: 4D
Theme: Functions

 
ARTICLE USAGE

4D SQL Reference ( 4D v11 SQL Release 4 )
4D SQL Reference ( 4D v14)
4D SQL Reference ( 4D v12.1)
4D SQL Reference ( 4D v13.4)
4D SQL Reference ( 4D v14 R2)
4D SQL Reference ( 4D v14 R3)
4D SQL Reference ( 4D v14 R4)