I have a database where a field's value is a comma separated list
indicating the basic categories the item belongs to.
so if the "categories" field has a value of "1,8,15"
I want to do a query like this:
SELECT categories FROM myTable WHERE "8" IN (categories);
but it only finds records where "8" is the only category...
Is there anyway for it to evaluate the contents fo the categories field
first rather than compare it as a whole?
The describe query works in MySQL, but the port doesn't... So far the
hack is to do something like this...
SELECT categories FROM myTable WHERE (","||categories||",") LIKE "%,7,%";
but I'm guessing LIKE isn't as efficient, and the query is more
awkward. Any advise would be appreciated. Thanks!
-Trevor
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users