pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Ramseyer <ramseyer@netnea.com>
To: basti <mailinglist@unix-solution.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: postgresql order lowercase before uppercase
Date: Fri, 19 Mar 2021 12:47:02 +0100
Message-ID: <82d22fc5-73a4-19dc-f927-b32dc9caacf5@netnea.com> (raw)
In-Reply-To: <dd09e24e-f89b-2a65-4246-e2c3babae49e@unix-solution.de>
References: <5a174fad-c30d-6d65-38c8-a3d9af8377df@unix-solution.de>
	<fa00b39eb7c7589cd604e386ff9ce59997906f5d.camel@cybertec.at>
	<34c739c1-b930-d58a-521b-c4a7b236d9bd@unix-solution.de>
	<f09b68f48506df4e122e279642f76165778b77fd.camel@cybertec.at>
	<dd09e24e-f89b-2a65-4246-e2c3babae49e@unix-solution.de>



On 19.03.21 10:12, basti wrote:
> On 19.03.21 08:33, Laurenz Albe wrote:
>> On Thu, 2021-03-18 at 23:51 +0100, basti wrote:
>>> Am 18.03.21 um 17:19 schrieb Laurenz Albe:
>>>> On Thu, 2021-03-18 at 15:39 +0100, basti wrote:
>>>>> I need to as follow:
>>>>>
>>>>> ande
>>>>> Amma
>>>>> Anit
>>>>> Anti
>>>>> Brac
>>>>> Cali
>>>>> ....
>>>>


Laurenz' approach is sound, it just needs a little tweak to not trip up
on the "andere Marken" uppercase M. Try this:

select id,
marke.name from marke
ORDER BY
  left(marke.name,1) <> left(lower(marke.name),1),
  marke.name

Fiddle:
http://sqlfiddle.com/#!17/d9d83e/9

Cheers
Christian

-- 
Christian Ramseyer, netnea ag
Network Management. Security. OpenSource.
https://www.netnea.com





view thread (12+ messages)  latest in thread

Message-ID: <82d22fc5-73a4-19dc-f927-b32dc9caacf5@netnea.com>
Permalink:  ../82d22fc5-73a4-19dc-f927-b32dc9caacf5@netnea.com/
Also on:    postgresql.org/message-id/82d22fc5-73a4-19dc-f927-b32dc9caacf5@netnea.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 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-general@postgresql.org
  Cc: ramseyer@netnea.com, mailinglist@unix-solution.de
  Subject: Re: postgresql order lowercase before uppercase
  In-Reply-To: <82d22fc5-73a4-19dc-f927-b32dc9caacf5@netnea.com>
  References: <5a174fad-c30d-6d65-38c8-a3d9af8377df@unix-solution.de> <fa00b39eb7c7589cd604e386ff9ce59997906f5d.camel@cybertec.at> <34c739c1-b930-d58a-521b-c4a7b236d9bd@unix-solution.de> <f09b68f48506df4e122e279642f76165778b77fd.camel@cybertec.at> <dd09e24e-f89b-2a65-4246-e2c3babae49e@unix-solution.de> <82d22fc5-73a4-19dc-f927-b32dc9caacf5@netnea.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