This won't be a trivial case to reproduce -- I need to create two tables,
with several rows, and my main db tool is broken right now.  I did find a
workaround,
groveling over the results in Python.

If I bind the values to literals like so:
select "... str1" as p1_path and "... str2" as p2_path where....

the substr clause works.  So I do need to create a real table to
repro this.

On Tue, Apr 5, 2011 at 5:12 PM, Igor Tandetnik <itandet...@mvps.org> wrote:

> 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
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to