pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: lynch@lscorp.com
To: Patrick Giagnocavo <pgiagnoc@qi.com>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] case-insensitive SORT BY?
Date: Tue, 22 Sep 1998 16:41:11 -0500
Message-ID: <v02140b5fb22d7ff8816a@[207.152.64.133]> (raw)

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@lscorp.com





view thread (4+ messages)  latest in thread

Message-ID: <v02140b5fb22d7ff8816a@[207.152.64.133]>
Permalink:  ../v02140b5fb22d7ff8816a@%5B207.152.64.133%5D/
Also on:    postgresql.org/message-id/v02140b5fb22d7ff8816a@[207.152.64.133]

 · 

reply

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: lynch@lscorp.com, pgiagnoc@qi.com
  Subject: Re: [SQL] case-insensitive SORT BY?
  In-Reply-To: <v02140b5fb22d7ff8816a@[207.152.64.133]>
  References: <v02140b5fb22d7ff8816a@[207.152.64.133]>

* 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