On 2014/07/05 17:26, Linh Duong wrote:
Hi All,
I encounter problem with the below SQL (it does not turn data from my database):
SELECT l.link_id, l.cat, l.bi_direction, l.frm_coord_id, l.to_coord_id, r.name,
l.start_jtn_elev, l.end_jtn_elev, r.id, r.code, r.prefix FROM Links l, Links_Index
x, Roads r WHERE l.link_id = x.link_id AND x.link_id MATCH
convexquad(?1,?2,?3,?4,?5,?6,?7,?8) AND cat <= 8 AND l.road_id = r.id
However, if I remove condition cat <= 8 the query returns data. Below is the
query:
SELECT l.link_id, l.cat, l.bi_direction, l.frm_coord_id, l.to_coord_id, r.name,
l.start_jtn_elev, l.end_jtn_elev, r.id, r.code, r.prefix FROM Links l,
Links_Index x, Roads r WHERE l.link_id = x.link_id AND x.link_id MATCH
convexquad(?1,?2,?3,?4,?5,?6,?7,?8) AND l.road_id = r.id
In these 2 queries, I implemented the custom R-Tree with function callback
convexquad. I am using SQLITE 3.8.5
Please help me explain this problem if possible.
Hi Linh, the mistake is easy to spot - "cat" is not defined, so it won't ever work. Did you mean l.cat or x.cat or perhaps r.cat
rather? I'm guessing l.cat as that seems to be one of the headers in the SELECT.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users