Thanks, this one does work.

----- Original Message ----- From: "Dan Baker" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Thursday, December 07, 2006 6:24 PM
Subject: Re: [sqlite] Searching for data


I do this in the following way:

SELECT * FROM tbl WHERE
(cola LIKE '%hello%' OR colb LIKE '%hello%' OR colc LIKE '%hello%')
AND
(cola LIKE '%juan%' OR colb LIKE '%juan%' OR colc LIKE '%juan%')
AND
(cola LIKE '%casa%' OR colb LIKE '%casa%' OR colc LIKE '%casa%')

This will return all records that have every word in them somewhere.

DanB


----- Original Message ----- From: "jose isaias cabrera" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Thursday, December 07, 2006 3:55 PM
Subject: [sqlite] Searching for data



Greetings.

I have a table with many columns. I would like to find records google-like on all the records. Say, for example the searching criteria is

hello juan casa

I would like to have any record that has all of those tokens in any of the columns.

how would I do that with a select? (imagine the table has cola, colb, colc.)

thanks,

josé


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to