Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 327 Bytes

Coalesce.md

File metadata and controls

13 lines (10 loc) · 327 Bytes

Keyword COALESCE

Show first NON NULL and non-NaN parameter:

    SELECT CAST(COALESCE(hourly_wage * 40 * 52, 
        salary, 
        commission * num_sales) AS money) AS [Total Salary]
    FROM wages
    ORDER BY [Total Salary];

See the working example in jsFiddle.