Top "Coalesce" questions

COALESCE is a SQL function that returns the first non-NULL expression among its arguments.

Checking an input param if not Null and using it in where in SQL Server

What is the best way to include an input param in the WHERE clause but exclude it if it is …

sql-server sql-server-2008 null where-clause coalesce
Using ISNULL vs using COALESCE for checking a specific condition?

I know that multiple parameters can be passed to COALESCE, but when you want to to check just one expression …

sql tsql coalesce isnull
"invalid input syntax for type numeric" for entering "emptyness"

I have a table with three columns using the NUMERIC type. However, two of them have nothing (ie. empty). Here …

postgresql-9.2 coalesce tsvector
How to COALESCE for empty strings and NULL values?

I'm trying to make the fastest COALESCE() that accepts two or more arguments, and returns the first non-null AND non-empty ("") …

sql postgresql coalesce
How to use Coalesce in MySQL

A little help here. I really don't understand how to use this coalesce in MySQL I have read all the …

mysql coalesce
MySQL: how to use COALESCE

Say I have the following table: TABLE: product =============================================================================== | product_id | language_id | name | description | =============================================================================== | 1 | 1 | Widget 1 | Really nice widget. Buy it …

mysql coalesce
SQL - Ugly combination of GROUP BY and COALESCE

I have a table with data similar to the following: [ID], [State], [foo], [DateCreated], [DateUpdated] The longer I work on …

sql group-by sql-server-2000 max coalesce
How to concatenate strings and commas in SQL Server?

I'm relatively new to MSSQL, so sorry if the question might sounds trivial. I want to concatenate multiple fields with …

sql sql-server concatenation coalesce
Is there a function equivalent to the Oracle's NVL in MySQL?

I'm selecting the max of a column from a table. But there is one problem: if there are no rows …

mysql coalesce nvl
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 …

sql sql-server ms-access coalesce