pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHelp with SELECT and string
3+ messages / 3 participants
[nested] [flat]
* Help with SELECT and string
@ 2001-09-28 15:11 Tomasz Misterka <tomasz@hieroglif.com.pl>
0 siblings, 2 replies; 3+ messages in thread
From: Tomasz Misterka @ 2001-09-28 15:11 UTC (permalink / raw)
To: pgsql-admin
Hello,
I've got a problem with finding how to search database with string without
checking if string is "Chris" or "chris".
Now when I'm searching database for word "chris" i can't find word
"Chris" - how the SELECT should looks like?
Thanks in advance
Tomasz Misterka
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Help with SELECT and string
@ 2001-10-02 17:22 Nick Fankhauser <nickf@ontko.com>
parent: Tomasz Misterka <tomasz@hieroglif.com.pl>
1 sibling, 0 replies; 3+ messages in thread
From: Nick Fankhauser @ 2001-10-02 17:22 UTC (permalink / raw)
To: Tomasz Misterka <tomasz@hieroglif.com.pl>; pgsql-admin
> Now when I'm searching database for word "chris" i can't find word
> "Chris" - how the SELECT should looks like?
select name from nametable where lower(name) = 'chris';
or
select name from nametable where upper(name) = 'CHRIS';
-Nick
PS: I'd suggest taking general SQL questions like this to the pgsql-general
list.
---------------------------------------------------------------------
Nick Fankhauser
Business:
nickf@doxpop.com Phone 1.765.965.7363 Fax 1.765.962.9788
doxpop - Court records at your fingertips - http://www.doxpop.com/
Personal:
nick@fankhausers.com http://www.fankhausers.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Help with SELECT and string
@ 2001-10-02 17:37 Stephan Szabo <sszabo@megazone23.bigpanda.com>
parent: Tomasz Misterka <tomasz@hieroglif.com.pl>
1 sibling, 0 replies; 3+ messages in thread
From: Stephan Szabo @ 2001-10-02 17:37 UTC (permalink / raw)
To: Tomasz Misterka <tomasz@hieroglif.com.pl>; +Cc: pgsql-admin
On Fri, 28 Sep 2001, Tomasz Misterka wrote:
> Hello,
>
> I've got a problem with finding how to search database with string without
> checking if string is "Chris" or "chris".
>
> Now when I'm searching database for word "chris" i can't find word
> "Chris" - how the SELECT should looks like?
Something like
select ... where lower(column) = 'chris'
should do what you want. If you want to use indexes you'll need to
make an index on lower(column)
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-10-02 17:37 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-09-28 15:11 Help with SELECT and string Tomasz Misterka <tomasz@hieroglif.com.pl>
2001-10-02 17:22 ` Nick Fankhauser <nickf@ontko.com>
2001-10-02 17:37 ` Stephan Szabo <sszabo@megazone23.bigpanda.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