COALESCE, IFNULL, or NZ() function that can be used in SQL Server and MS Access
问题 I have a project that can use either SQL Server or MS Access as the data store. In one SELECT statement, I must perform a COALESCE operation on a single column and a single value, like this: SELECT COALESCE([Amount], 0) FROM PaymentsDue; I would like to write a single SQL statement that will execute correctly in both SQL Server and MS Access. The SQL Server version that is of immediate interest is 2008, although a solution applicable across versions would be preferred. Earlier today, someone