>On Sep 1, 2014, at 6:00 PM, Igor Tandetnik <i...@tandetnik.org> wrote:
>
>> (case when billdate != '' then billdate else bdate end)
>
>Or, more succinctly:
>
>coalesce( nullif( billdate, '' ), bdate )
>
>(To OP: empty strings are E V I L. Don't use them. Ever.)

Unless of course it is one or more spaces and not an empty string ...

coalesce(nullif(rtrim(billdate), ''), bdate)

an empty string is indistinguishable from a string of one or more spaces unless 
one makes efforts to tell the difference.




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to