Returning Null Value - Coalesce and ISNULL

Chris90

I may be having a brain fog, but if I have below:

COALESCE(NULLIF(Address.Info,''), 'Invalid')

Which gives me the value of invalid for all fields in my info column that have an empty space, if I used ISNULL instead of COALESCE would it give me the same result? I cannot access a sql engine currently so just wanted to sanity check. Thanks!

ISNULL(NULLIF(Address.Info,''), 'Invalid')
Piotr Findeisen

The two expressions should be equivalent in e.g. Oracle, which supports these functions.

Presto does support the standard coalesce(). It does not have isnull function though. See more at https://trino.io/docs/current/functions/conditional.html

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related