Re: Searching text

by Eric Anderson <eric_anderson(at)hrsoft.com>

 Date:  Tue, 02 May 2000 11:09:45 -0500
 To:  "Rob Eager" <rad_dev(at)ihug.com.au>,
<hwg-languages(at)mail.hwg.org>
 In-Reply-To:  o7f2v4
  todo: View Thread, Original
It sounds like you are using MSAccess.  Is this the case?  Regardless, is 
there anything preventing you from simply using SQL statements?

[ In other words it needs to be searchable for each client (eg for 
client-ID=123 find client-comments="only buys brand names") ]

could become

[ select client_comments from client_table where client_id = 123 and 
client_comments = 'only buys brand names' ]

and

[ It also needs to be searchable the other way around (eg for 
client-comments="brand names" find client-ID) ]

could become

[ select client_id from client_table where client_comments like '*brand 
names*' ] (standard SQL uses % instead of *)

Would this work?  If so, :-) otherwise you might need to elaborate on what 
you have tried and what you found doesn't work.

All smiles,
Eric

At 11:16 PM 5/2/00 +1000, Rob Eager wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Hi all,
>
>I'm wondering if someone could give me a few pointers on a question:
>
>I am creating a database that will eventually be used on an intranet.
>  Within this database is to be a place for comments.  The general
>shape the database will take is this:
>
>client-ID: int, unique.
>client-name: <called from another db> (eg client-details)
>client-comments:  text area for comments.
>
>Of course it's a little more detailed than that but that is the main
>idea.  The problem area is the client-comments field.  This needs to
>be fairly extensive which as far as I'm aware rules out using text as
>type as it is limited to 255 chars.  A memo type would work well
>however as it seems to allow more chars.  The main worry with this
>field is the fact that it needs to be searchable in itself.  In other
>words it needs to be searchable for each client (eg for client-ID=123
>find client-comments="only buys brand names").  It also needs to be
>searchable the other way around (eg for client-comments="brand names"
>find client-ID).
>
>I hope this is an appropriate forum, it's slightly off web techniques
>but the search results will be posted via the usual cgi/script.  The
>problem is in getting the comments field searchable.  Any help would
>be most appreciated.
>
>Regards,
>
>Rob Eager
>Sydney, Au.
>
>-----BEGIN PGP SIGNATURE-----
>Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
>
>iQA/AwUBOQ5IdhDBgH3/ltyVEQJF3QCbBqg2VpmoGR3zeM12y6fxU/RLSCgAni2d
>Q9iaWxob2kaTvIXylVxi4ELK
>=44V+
>-----END PGP SIGNATURE-----

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA