Re: [sqlite] Whole word search

2004-12-08 Thread D. Richard Hipp
[EMAIL PROTECTED] wrote:
How do I search on whole words within a text field.  For example, if I want to
find the whole word "main" and don't want records with "maintain", how can I do
that with Sqlite? 

Write your own string comparison function that does such things
and register it using sqlite3_create_function().
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


[sqlite] Whole word search

2004-12-08 Thread brettg
I asked this question yesterday but got no answer, so here goes my second try.

How do I search on whole words within a text field.  For example, if I want to
find the whole word "main" and don't want records with "maintain", how can I do
that with Sqlite?  I tried using brackets as specified in the SQL spec but it
doesn't work - I get errors.

Here is some documentation from MS SQL Server:

[ ]
Any single character within the specified range ([a-f]) or set ([abcdef]).

WHERE au_lname LIKE '[C-P]arsen' finds author last names ending with arsen and
beginning with any single character between C and P, for example Carsen,
Larsen, Karsen, and so on.




This message was sent using IMP, the Internet Messaging Program.