Re: [SQL] case-insensitive SORT BY?
Richard Lynch <lynch@lscorp.com>
From: lynch@lscorp.com (Richard Lynch)
To: Patrick Giagnocavo <pgiagnoc@qi.com>, pgsql-sql@postgreSQL.org
Date: 1998-09-22T21:41:11Z
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@lscorp.com