Re: [sqlite] FTS3 Question

2008-05-22 Thread Dennis Cote
Scott Hess wrote: > I think you're going to have to run some code to generate the string > to match against. The problem is that you need to take all of the > 'query' fields from 'category' and combine them into a string like > 'query1 OR query2 OR query3 OR ...'. I'm not aware of a way to do >

Re: [sqlite] FTS3 Question

2008-05-20 Thread Mike Marshall
Thanks for the help Scott, you've confirmed what I had concluded. Thanks again M -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Hess Sent: 20 May 2008 17:00 To: General Discussion of SQLite Database Subject: Re: [sqlite] FTS3 Question I think

Re: [sqlite] FTS3 Question

2008-05-20 Thread Scott Hess
I think you're going to have to run some code to generate the string to match against. The problem is that you need to take all of the 'query' fields from 'category' and combine them into a string like 'query1 OR query2 OR query3 OR ...'. I'm not aware of a way to do this with straight SQL. You

Re: [sqlite] FTS3 Question

2008-05-20 Thread Mike Marshall
What I'm trying to do is get the query strings that are stored in category executed against the text stored in data. Category is essentially a fixed set of content, whilst data changes. I could just step through category and execute each query individually, but I was looking for a way to do it

Re: [sqlite] FTS3 Question

2008-05-19 Thread Scott Hess
Should the 'data' table be joinable with the 'category' table in some way? Are you trying to match rows in 'data' which contain _all_ of the 'query' items from 'category', or which contain _any_ of the 'query' items from 'category'? Do you mean to have a WHERE clause or anything on what you're

Re: [sqlite] FTS3 Question

2008-05-17 Thread Petite Abeille
On May 17, 2008, at 9:49 AM, Mike Marshall wrote: > SELECT guid FROM data WHERE text MATCH SELECT query FROM category Perhaps something along these lines: select data.guid fromdata joincategory on category.guid = data.guid where data.text match category.query Or something :) --

[sqlite] FTS3 Question

2008-05-17 Thread Mike Marshall
I have an FTS3 table created as follows CREATE VIRTUAL TABLE data USING fts3(guid, text) And a standard table created thus CREATE TABLE category (label, query) What I would like to be able to do is an SQL query of the form SELECT guid FROM data WHERE text MATCH SELECT query