In T-SQL, you can do this:
SELECT ProductId, COALESCE(Price, 0) FROM Products
How do you do the same thing in Access SQL? I see examples for doing it with Nz in VBA, but I’m looking for the SQL equivalent.
Thanks.
Advertisement
Answer
Access supports the Nz
function and allows you to use it in a query. Note though that Nz
is the same as the T-SQL ISNULL
function. It can not take an arbitrary number of parameters like COALESCE
can.