Sender: owner-postgres95@postgres.Berkeley.EDU
X-Return-Path: andrew_yu
Received: from eden.CS.Berkeley.EDU (eden.CS.Berkeley.EDU [128.32.37.56]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with ESMTP id NAA18096 for <postgres95>; Mon, 6 Nov 1995 13:33:58 -0800
Received: (andrew@localhost) by eden.CS.Berkeley.EDU (8.6.10/8.6.3) id NAA16504 for postgres95; Mon, 6 Nov 1995 13:33:56 -0800
Date: Mon, 6 Nov 1995 13:33:56 -0800
From: "Andrew K. Yu" <andrew@postgres.Berkeley.EDU>
Message-Id: <199511062133.NAA16504@eden.CS.Berkeley.EDU>
To: postgres95@postgres.Berkeley.EDU
Subject: (fwd)
Resent-To: postgres95-redist
Resent-Date: Mon, 06 Nov 95 13:33:59 -0800
Resent-From: pglite
Resent-XMts: smtp


>From pglite Mon Nov  6 11:53:57 1995
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with SMTP id LAA21749 for owner-postgres95; Mon, 6 Nov 1995 11:53:57 -0800
Resent-From: Postgres95 Team <pglite@postgres.Berkeley.EDU>
Resent-Message-Id: <199511061953.LAA21749@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol
Received: from gatekeeper.Bridge.COM (gatekeeper.bridge.com [167.76.159.11]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with ESMTP id LAA21605 for <postgres95@postgres.Berkeley.EDU>; Mon, 6 Nov 1995 11:53:55 -0800
Received: (from mailproxy@localhost) by gatekeeper.Bridge.COM (8.6.12/8.6.9) id NAA17510 for <postgres95@postgres.Berkeley.EDU>; Mon, 6 Nov 1995 13:45:07 -0600
Received: from ignatz.bridge.com(167.76.24.6) by gatekeeper.Bridge.COM via smap (V1.0mjr)
id sma017503; Mon Nov  6 13:45:02 1995
Received: from escape.bridge.com by ignatz.bridge.com with SMTP id AA24473
  (5.67b/IDA-1.5 for <postgres95@postgres.Berkeley.EDU>); Mon, 6 Nov 1995 13:59:18 -0600
Received: by escape.bridge.com (4.1/SMI-4.1)
id AA23884; Mon, 6 Nov 95 14:00:55 CST
Date: Mon, 6 Nov 95 14:00:55 CST
From: jarnott@bridge.com (Jim Arnott)
Message-Id: <9511062000.AA23884@escape.bridge.com>
To: postgres95@postgres.Berkeley.EDU
Subject: Re: word/sub-word
Resent-To: owner-postgres95@postgres.Berkeley.EDU
Resent-Date: Mon, 06 Nov 95 11:53:56 -0800
Resent-XMts: smtp
Status: RO

> 
>         For reasons that are stupid, I need to be able to let users of Web
> forms that search our Postgres95 databases have an option to search for a
> whole word or sub-word.  For instance, is somone give "SONG" as a title,
> then for whole word match, things like "SONGS" and "SONGBOOK" would not
> return (they would for sub-word).  My question is, how do I form these
> requests?  Currently, I use LIKE '%user_word%', which works fine for
> sub-word.  Any help would be highly appreciated.
> 
> 
> bryon

You may want to try LIKE '% user_word %' .

Also 
TEXT LIKE '% user_word %' 
OR TEXT LIKE 'user_word %' 
OR TEXT LIKE '% user_word'  

should be even more accurate.

Now, how would you do the case-insensitive ?

-jim arnott


===============================================================================
  To unsubscribe from the Postgres95 mailing list, send mail with the subject
  line "DEL" to "postgres95-request@postgres.Berkeley.EDU". 
============  URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres95/  ===========
