From: | Christian Ramseyer <ramseyer(at)netnea(dot)com> |
---|---|
To: | basti <mailinglist(at)unix-solution(dot)de>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: postgresql order lowercase before uppercase |
Date: | 2021-03-19 11:47:02 |
Message-ID: | 82d22fc5-73a4-19dc-f927-b32dc9caacf5@netnea.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Frank Millman | 2021-03-19 12:28:27 | Re: SELECT is faster on SQL Server |
Previous Message | Pavel Stehule | 2021-03-19 11:10:43 | Re: SELECT is faster on SQL Server |