Received: from lscorp.com (poohbah.lscorp.com [207.152.64.2]) by hub.org (8.8.8/8.8.8) with ESMTP id RAA08117 for ; Tue, 22 Sep 1998 17:42:57 -0400 (EDT) (envelope-from lynch@lscorp.com) Received: from [207.152.64.133] by lscorp.com with SMTP (Eudora Internet Mail Server 1.2); Tue, 22 Sep 1998 16:41:11 -0500 X-Sender: lynch@poohbah.lscorp.com Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Patrick Giagnocavo , pgsql-sql@postgreSQL.org From: lynch@lscorp.com (Richard Lynch) Subject: Re: [SQL] case-insensitive SORT BY? Date: Tue, 22 Sep 1998 16:41:11 -0500 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