Search Postgresql Archives

Re: postgresql order lowercase before uppercase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux