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.
There was an error while loading. Please reload this page.
Quick links
AlaSQL wiki frontpage
About AlaSQL
Install AlaSQL
Get started with AlaSQL