From: reedstrm@wallace.ece.rice.edu
To: alewis@themecca.net
Cc: pgsql-sql@hub.org
Subject: Re: [SQL] Case insensitive searchs
Date: Sun, 18 Apr 1999 13:51:15 -0500 (CDT)
Message-ID: <m10Ywex-000LJrC@wallace.ece.rice.edu> (raw)
In-Reply-To: <Pine.LNX.4.05.9904181328250.21774-100000@tmg.themecca.net>
Hmm, what version of postgresql are you using? In my hands, the 'distinct'
works on the output of ther function call, as seen in my previous email.
You do realize that 'distinct' works on the entire returned row, not
just a single field, so, to continue my previous example:
test=> select distinct initcap(city),upper(state) from addr_table;
initcap |upper
-----------+-----
San Antonio|TX
(1 row)
test=> select distinct initcap(city),upper(state),oid from addr_table;
initcap |upper| oid
-----------+-----+-----
San Antonio|TX |25354
San Antonio|TX |25355
San Antonio|TX |25356
San Antonio|TX |25357
(4 rows)
test=> select distinct initcap(city),upper(state),oid from addr_table group by initcap(city);
initcap |upper| oid
-----------+-----+-----
San Antonio|TX |25354
(1 row)
test=>
> The problem is that I don't know all of the city names.
>
> I was trying to do a:
>
> select distinct lower(city) from mytable
is that _all_ the return fields you specified?
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: reedstrm@wallace.ece.rice.edu, alewis@themecca.net, pgsql-sql@hub.org
Subject: Re: [SQL] Case insensitive searchs
In-Reply-To: <m10Ywex-000LJrC@wallace.ece.rice.edu>
References: <Pine.LNX.4.05.9904181328250.21774-100000@tmg.themecca.net> <m10Ywex-000LJrC@wallace.ece.rice.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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