LIKE search

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Mar 7 17:56:10 CST 2003


on 3/7/03 5:36 PM, Martin Wright at martin at kinetix.co.uk wrote:

Hi Martin,

> I'm having problems with the LIKE sql command when using AND
> The results from statements 2 & 3 return approx 10 results of the same
> Issues.Title
> But when I try to combine the search into statement 1 I get no results.
> 
> Maybe there's a better way to search for multiple words.
> Can You help?

> 1.
> The following returns no results
> 
> SELECT DISTINCT Issues.Title
> FROM Issues,Abstracts,Keywords
> WHERE (Keywords.Keyword LIKE 'confusion' no_case)
> AND (Keywords.Keyword LIKE 'FIRDA' no_case)
> ORDER BY Issues.Title
> 
> 
> 
> 2.
> But if I try this I get 20 results:
> 
> SELECT DISTINCT Issues.Title
> FROM Issues,Abstracts,Keywords
> WHERE (Keywords.Keyword LIKE 'confusion' no_case)
> ORDER BY Issues.Title
> 
> 
> 
> 3.
> And if I try this I get 22 results:
> 
> SELECT DISTINCT Issues.Title
> FROM Issues,Abstracts,Keywords
> WHERE (Keywords.Keyword LIKE 'FIRDA' no_case)
> ORDER BY Issues.Title

But this can correct result, because you ask AND,

So it must return a record only if have BOTH keywords.
Probably you want ask OR

Also check REGEX docs, and try to use

    LIKE 'confusion|FIRDA'

This is why same OR search but made by REGES self.
It must works faster because only on iteration will be done

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list