On 9/1/2014 12:02 AM, jic wrote:
SELECT cust, sum(ProjFund), sum(Xtra8), coalesce(billdate,bdate) as t
But this is not working correctly, as the beginning of the result, there
is no number because billdate is empty. So, I get a list like this:
Co01|13016.16|20024.46|
How is "absence of billdate" represented in the database - as NULL or as
empty string? I suspect it's the latter. coalesce() only treats nulls as
"special", not empty strings. See how the answer changes if you replace
coalesce(billdate,bdate) with
(case when billdate != '' then billdate else bdate end)
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users