Top "Coalesce" questions

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

Using NVL for multiple columns - Oracle SQL

Good morning my beloved sql wizards and sorcerers, I am wanting to substitute on 3 columns of data across 3 tables. Currently …

sql oracle coalesce nvl
COALESCE in JPA namedQuery

I have the following namedQuery select new test.entity.Emp(COALESCE(k.projectId,'N') as projectId, k.projectName) from Emp …

java jpa coalesce toplink nvl
How to implement coalesce efficiently in R

Background Several SQL languages (I mostly use postgreSQL) have a function called coalesce which returns the first non null column …

r coalesce
Select a default value if returned result is NULL in MySQL

The following query runs fine, but I want to input the option that if the email returned is NULL, then …

mysql sql coalesce
ERROR: COALESCE types timestamp without time zone and integer cannot be matched (Postgresql)

## PROBLEM ## I got error from this script (Postgresql 9.3.2) ( It's OK in MS SQL Server ) SELECT CASE COALESCE(my_date_field,0) …

coalesce postgresql-9.3
Merge rows in a dataframe where the rows are disjoint and contain NAs

I have a dataframe that has two rows: | code | name | v1 | v2 | v3 | v4 | |------|-------|----|----|----|----| | 345 | …

r dataframe dplyr data.table coalesce
COALESCE() for blank (but not null) fields

I have two fields that I'm comparing with MySQL's function COALESCE(). For example, COALESCE(Field1, Field2). The problem is, Field1 …

mysql sql coalesce
Usage of Coalesce or Case statement in JPA

How to use coalesce or case statement in JPA 2 using CriteriaBuilder For many records initiatedBy will be empty and as …

hibernate jpa jpa-2.0 criteria-api coalesce
Return first non-null value

I have a number of functions: String first(){} String second(){} ... String default(){} Each can return a null value, except the …

java lazy-evaluation coalesce
ISNULL(Count(x),0) not returning 0 when null

I have the following code: SELECT FirstName, LastName, (SELECT ISNULL(COUNT(UP1.EmailAddress), 0) AS HasEmail From dbo.UserProfiles AS UP1 …

tsql coalesce isnull