Top "Coalesce" questions

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

How to concatenate columns in a Postgres SELECT?

I have two string columns a and b in a table foo. select a, b from foo returns values a …

sql postgresql types concatenation coalesce
Best way to check for "empty or null value"

What is best way to check if value is null or empty string in Postgres sql statements? Value can be …

sql database postgresql null coalesce
Oracle Differences between NVL and Coalesce

Are there non obvious differences between NVL and Coalesce in Oracle? The obvious differences are that coalesce will return the …

sql oracle coalesce nvl
Using COALESCE to handle NULL values in PostgreSQL

I have the following query SELECT DISTINCT pt.incentive_marketing, pt.incentive_channel, pt.incentive_advertising FROM test.pricing pt …

sql database postgresql null coalesce
Return zero if no record is found

I have a query inside a stored procedure that sums some values inside a table: SELECT SUM(columnA) FROM my_…

sql postgresql null plpgsql coalesce
How to get the first non-null value in Java?

Is there a Java equivalent of SQL's COALESCE function? That is, is there any way to return the first non-null …

java coalesce
Changing a SUM returned NULL to zero

I have a stored procedure as follows: CREATE PROC [dbo].[Incidents] (@SiteName varchar(200)) AS SELECT ( SELECT SUM(i.Logged) FROM …

sql null sum zero coalesce
?? Coalesce for empty string?

Something I find myself doing more and more is checking a string for empty (as in "" or null) and a …

c# string coalesce null-coalescing-operator
Is there a coalesce-like function in Excel?

I need to fill a cell with the first non-empty entry in a set of columns (from left to right) …

sql excel xls coalesce
ORA-12704: character set mismatch

Hell when I do: select COALESCE (CORP_ID, 0) from crmuser.accounts; The CORP_ID records which are Null returns 0 but …

oracle oracle11g coalesce