p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_howto thread: RE: flexible search


Message #1 by "Ciano, Alberto (PS, NP)" <alberto.ciano@n...> on Sat, 3 Aug 2002 16:51:01 +0200
Hi,

may be I am too easy in providing you an answer ... but neverthenless 
...

did you try to use the following sintax in your query statment ?

     "SELECT ... FROM .... WHERE .. =3D'%" & <your value> &"%'"

Regards,
Alberto

-----Original Message-----
From: dfalconer@g... [mailto:dfalconer@g...]
Sent: venerd=EC 26 luglio 2002 18.33
To: Pro ASP HowTo
Subject: [proasp_howto] flexible search


At present my search engine searches through a colum of keywords in an 
SQL
database. The keywords are divided by semicolons (;). At the moment the 

code used to search through the keywords is a like statement. Problem 
is
it only picks up exact phrases.

For instance if the keywords in a record were:
great teams; usa; scotland team

if the person searched for 'great teams' they would get a result if 
they
serached for 'great teams usa' then no result, now i could fix this by
taking out the semi-colons.

However this wouldnt fix the problem that if someone entered team 
scotland
they would get a result but if the entered scotland team they would. I
basically want all the words in the keyword colum to be searchable
individually unless the person wraps the entry in a "". I have tried to 

use the CONTAINS predicate but get and ODBC error. Any ideas on 
developing
a more flexible search system.

  Return to Index