my best solution:
WHERE COALESCE(char_length(fieldValue), 0) = 0
COALESCE returns the first nonzero expr in the expression list ().
if fieldValue is a null or empty string, then: we will return the second element, then 0.
therefore 0 is 0, then this fieldValue is an empty or empty string.
in python for example:
def coalesce(fieldValue): if fieldValue in (null,''): return 0
good luck
Anouar Mokhtari Feb 15 '17 at 13:47 on 2017-02-15 13:47
source share