Re: ORDER BY case insensitive?

From: "Jeff Boes" <jboes(at)nexcerpt(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: ORDER BY case insensitive?
Date: 2001-10-03 14:17:35
Message-ID: 9pf6jc$150t$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

In article <PXEu7(dot)602317$T97(dot)80972819(at)typhoon(dot)nyroc(dot)rr(dot)com>, "Bob
Swerdlow" <swerdlow(at)maine(dot)rr(dot)com> wrote:

> How do I get the rows sorted in a case insensitive way?

> SELECT * FROM MyTable ORDER BY Name;

Try

SELECT * FROM MyTable ORDER BY upper(Name);

(or 'lower(Name)').

--
Jeff Boes vox 616.226.9550
Database Engineer fax 616.349.9076
Nexcerpt, Inc. jboes(at)nexcerpt(dot)com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-10-03 14:48:51 Re: 7.0.3 and 7.1.3 different results?
Previous Message Bob Swerdlow 2001-10-03 14:06:39 ORDER BY case insensitive?