pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSearch
5+ messages / 5 participants
[nested] [flat]
* Search
@ 2001-02-05 21:21 Sebastian --[ www.flashhilfe.de ]-- <hallogammler@aol.com>
0 siblings, 3 replies; 5+ messages in thread
From: Sebastian --[ www.flashhilfe.de ]-- @ 2001-02-05 21:21 UTC (permalink / raw)
To: pgsql-sql
Hi
I hope someone can help me....
My problem:
I have make a search machine whit:
LIKE '%$suchbegriffe[$i]%'
but when I search Test - the search machine shows only entries
whit Test. But not test or tESt.
(sorry for my bad english)
Regards, Sebastian
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Search
@ 2001-02-06 13:28 PM <pmeloy@home.negate.spam.com>
parent: Sebastian --[ www.flashhilfe.de ]-- <hallogammler@aol.com>
2 siblings, 1 reply; 5+ messages in thread
From: PM @ 2001-02-06 13:28 UTC (permalink / raw)
To: pgsql-sql
force lower case or use the non case-senstitive search e.g.
lower(column) LIKE lower('%$suchbegriffe[$i]%')
or
column ~* '$suchbegriffe[$i]'
(no need for wildcards when using ~* it assumes %value%)
"Sebastian --[ www.flashhilfe.de ]--" <hallogammler@aol.com> wrote in
message news:95n58g$5fa$1@news.tht.net...
> Hi
>
> I hope someone can help me....
>
> My problem:
>
> I have make a search machine whit:
>
> LIKE '%$suchbegriffe[$i]%'
>
> but when I search Test - the search machine shows only entries
> whit Test. But not test or tESt.
>
> (sorry for my bad english)
>
> Regards, Sebastian
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Search
@ 2001-02-06 13:47 Sebastian <pchous45@saxnet.com>
parent: PM <pmeloy@home.negate.spam.com>
0 siblings, 0 replies; 5+ messages in thread
From: Sebastian @ 2001-02-06 13:47 UTC (permalink / raw)
To: pgsql-sql
Thank you!!!
It works perfect !!
Regards, Sebastian
PM <pmeloy@home.negate.spam.com> schrieb in im Newsbeitrag:
95otrr$hjg$1@news.tht.net...
> force lower case or use the non case-senstitive search e.g.
>
> lower(column) LIKE lower('%$suchbegriffe[$i]%')
>
> or
>
> column ~* '$suchbegriffe[$i]'
> (no need for wildcards when using ~* it assumes %value%)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Search
@ 2001-02-06 14:09 Brett W. McCoy <bmccoy@chapelperilous.net>
parent: Sebastian --[ www.flashhilfe.de ]-- <hallogammler@aol.com>
2 siblings, 0 replies; 5+ messages in thread
From: Brett W. McCoy @ 2001-02-06 14:09 UTC (permalink / raw)
To: Sebastian --[ www.flashhilfe.de ]-- <hallogammler@aol.com>; +Cc: pgsql-sql
On Mon, 5 Feb 2001, Sebastian --[ www.flashhilfe.de ]-- wrote:
> I have make a search machine whit:
>
> LIKE '%$suchbegriffe[$i]%'
>
> but when I search Test - the search machine shows only entries
> whit Test. But not test or tESt.
LIKE is case-sensitive. You should convert your column to uppercase:
WHERE UPPER(field) LIKE ...
or use case-insensitive regular expression:
WHERE field ~* '<regexp>'
-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
The Angels want to wear my red shoes.
-- E. Costello
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Search
@ 2001-02-06 18:18 Jie Liang <jliang@ipinc.com>
parent: Sebastian --[ www.flashhilfe.de ]-- <hallogammler@aol.com>
2 siblings, 0 replies; 5+ messages in thread
From: Jie Liang @ 2001-02-06 18:18 UTC (permalink / raw)
To: Sebastian --[ www.flashhilfe.de ]-- <hallogammler@aol.com>; +Cc: pgsql-sql
Hi,
You seem want to match string insensitively, I guess.
Try:
~* 'test' -- match Test|tEst|tESt ...
~* '.*test.*' -- match whateverTesTwhatever
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang@ipinc.com
www.ipinc.com
On Mon, 5 Feb 2001, Sebastian --[ www.flashhilfe.de ]-- wrote:
> Hi
>
> I hope someone can help me....
>
> My problem:
>
> I have make a search machine whit:
>
> LIKE '%$suchbegriffe[$i]%'
>
> but when I search Test - the search machine shows only entries
> whit Test. But not test or tESt.
>
> (sorry for my bad english)
>
> Regards, Sebastian
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2001-02-06 18:18 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-05 21:21 Search Sebastian --[ www.flashhilfe.de ]-- <hallogammler@aol.com>
2001-02-06 13:28 ` PM <pmeloy@home.negate.spam.com>
2001-02-06 13:47 ` Sebastian <pchous45@saxnet.com>
2001-02-06 14:09 ` Brett W. McCoy <bmccoy@chapelperilous.net>
2001-02-06 18:18 ` Jie Liang <jliang@ipinc.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox