On 10/13/2014 9:39 AM, Paul Sanderson wrote:
The
query seems to work OK if a single bit is set, but fails (a blank string is
returned) when multiple bits are set. Any ideas why?

CASE x WHEN y ... checks that x = y, not that x & y != 0. You are checking for equality with a one-bit value - so of course it only checks out when the other side of the comparison is also a one-bit value.

You want

CASE WHEN visits.transition & 0x00800000 THEN 'Blocked' ELSE '' END

--
Igor Tandetnik

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

Reply via email to