On 4/5/2011 6:59 PM, Eric Promislow wrote:
> Notice the clause in the middle of the query:
>        and (substr(p2.path, length(p1.path) + 1, 1) = "/"
>              or substr(p2.path, length(p1.path) + 1, 1) != "/")
>
> If I comment out this full clause, the query returns the expected result
> set.
>
> But if I leave it uncommented, the query returns an empty set.  But the
> clause
> should be tautologically true -- either the character after the prefix is
> "/" or it
> isn't.

The third possiblity is that substr() returns null, in which case both 
comparisons will be false.
-- 
Igor Tandetnik

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

Reply via email to