Re: [SQL] case-insensitive SORT BY?

From: lynch(at)lscorp(dot)com (Richard Lynch)
To: Patrick Giagnocavo <pgiagnoc(at)qi(dot)com>, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] case-insensitive SORT BY?
Date: 1998-09-22 21:41:11
Message-ID: v02140b5fb22d7ff8816a@[207.152.64.133]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Cheat. Get the name back, *AND* a second "field" with the name in upper
case, and then sort by that upper-cased name. EG:

"select name, upper(name) as key where name like '%clinton%' sort by key"

At 3:53 PM 9/22/98, Patrick Giagnocavo wrote:
>I am trying to ensure that when I do a SORT BY I get back the results in
>normal sorted order instead of case-sensitive order. The WHERE clause
>contains a LIKE '%..%' so I cannot use UPPER here in a way that does
>what I want.
>
>e.g. , given
>
>A, B, b, a
>
>as data, the normal SORT BY behavior returns
>
>a
>b
>A
>B
>
>How do I make it return
>
>a
>A
>b
>B
>
>instead?

--
--
-- "TANSTAAFL" Rich lynch(at)lscorp(dot)com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jackson, DeJuan 1998-09-22 23:09:56 RE: [SQL] To create the query for a select where one is NOT in th e other
Previous Message Eric McKeown 1998-09-22 20:49:32 RE: [SQL] To create the query for a select where one is NOT in th e other