pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason Earl <jdearl@yahoo.com>
To: Bob Swerdlow <swerdlow@maine.rr.com>
To: pgsql-sql@postgresql.org
Subject: Re: ORDER BY case insensitive?
Date: Thu, 4 Oct 2001 12:47:46 -0700 (PDT)
Message-ID: <20011004194746.21583.qmail@web10004.mail.yahoo.com> (raw)
In-Reply-To: <PXEu7.602317$T97.80972819@typhoon.nyroc.rr.com>

SELECT * FROM MyTable ORDER BY lower(Name);

Should do the trick.

Jason Earl

--- Bob Swerdlow <swerdlow@maine.rr.com> wrote:
> How do I get the rows sorted in a case insensitive
> way?
> 
> I have some queries that basically fit the form:
>      SELECT * FROM MyTable ORDER BY Name;
> When I view the results, all of the Name's that
> start with an upper case
> letter precede all of the Name's that start with a
> lower case letter.  I
> want them all in alphabetic order, regardless of
> case.
> 
> I've looked in PostgreSQL Introduction and Concepts
> by Bruce Momjian and in
> the FAQ at
> http://postgresql.overtone.org/docs/faq-english.html
> 
> Thanks for your help.
> 
> --
> Bob Swerdlow
> Chief Operating Officer
> Transpose, LLC
> rswerdlow@transpose.com
> 
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org


__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



view thread (8+ messages)  latest in thread

Message-ID: <20011004194746.21583.qmail@web10004.mail.yahoo.com>
Permalink:  ../20011004194746.21583.qmail@web10004.mail.yahoo.com/
Also on:    postgresql.org/message-id/20011004194746.21583.qmail@web10004.mail.yahoo.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jdearl@yahoo.com, swerdlow@maine.rr.com
  Subject: Re: ORDER BY case insensitive?
  In-Reply-To: <20011004194746.21583.qmail@web10004.mail.yahoo.com>

* 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