Re: order by query wrong result - Mailing list pgsql-admin

From jayknowsunix@gmail.com
Subject Re: order by query wrong result
Date
Msg-id CB75D42A-9FCD-46D7-AF05-F005BF820385@gmail.com
Whole thread Raw
In response to order by query wrong result  (Silvio Brandani <silvio.brandani@tech.sdb.it>)
Responses Re: order by query wrong result  (Scott Ribe <scott_ribe@elevated-dev.com>)
List pgsql-admin
That doesn't look like an error to me. The upper() function is only converting your name field to upper case and then
the"order by" is simply alphabetical based on that, which is what your return values are. What are you expecting to get
back?Your query probably needs adjusting. 

--Jay

Sent from my iPad

> On Nov 19, 2014, at 8:56 AM, Silvio Brandani <silvio.brandani@tech.sdb.it> wrote:
>
>
> Hi all,
>
> we have a  query with wrong result  in order by :
>
> select *
> from prova
> where name ilike 'savino del bene s%'
> and record_status = 'A'
> order by upper(name);
>
>
> and we get:
>
>
> Savino Del Bene Santo Domingo
> Savino Del Bene Singapore
> Savino Del Bene Singapore - Airport Office
> Savino Del Bene South Africa - Cape Town
> Savino Del Bene South Africa - Durban
> Savino Del Bene South Africa - Johannesburg
> Savino Del Bene South Africa - Port Elizabeth
> Savino Del Bene S.p.A. Campogalliano (MO)
> Savino Del Bene S.p.A. Capodichino
> Savino Del Bene S.p.A. Firenze
> Savino Del Bene S.p.A. Genova
> Savino Del Bene S.p.A. Headquarters
> Savino Del Bene Spain S.L. - Alicante
> Savino Del Bene Spain S.L. - Barcelona
> Savino Del Bene Spain S.L. - Bilbao
> Savino Del Bene Spain S.L. - Madrid
> Savino Del Bene Spain S.L. - Palma de Mallorca
> Savino Del Bene Spain S.L. - Valencia
> Savino Del Bene Spain S.L. - Valencia Headquarter
> Savino Del Bene Spain S.L. - Vigo
> Savino Del Bene S.p.A. Livorno
> Savino Del Bene S.p.A. Livorno ufficio Genova c/o Spedimar  S.r.L.
> Savino Del Bene S.p.A. Livorno ufficio La Spezia
> Savino Del Bene S.p.A. Milano
> Savino Del Bene S.p.A. Montecosaro Scalo
> Savino Del Bene S.p.A. Montemurlo (PO)
> Savino Del Bene S.p.A. Napoli
> Savino Del Bene S.p.A. Osmannoro(FI)
> Savino Del Bene S.p.A. Oste (PO)
> Savino Del Bene S.p.A. Padova
> Savino Del Bene S.p.A. Pietrasanta
> Savino Del Bene S.p.A. Pisa
> Savino Del Bene S.p.A. San Miniato
> Savino Del Bene S.p.A. Torino
> Savino Del Bene S.p.A. Treviso
> Savino Del Bene S.p.A. Udine
> Savino Del Bene S.p.A. Verona
> Savino Del Bene S.p.A. Vicenza
> Savino Del Bene Switzerland AG - Basel
> Savino Del Bene Switzerland - Rancate
>
>
> Each help higly appreciated,
>
> Silvio Brandani
>
>
> --------------------------------------------------------------------------------
>
>
>
> This message is for the recipients only. If you receive it in error, please notify the sender and delete it together
withany attachments. For any further information, including our privacy policy please refer to
http://www.savinodelbene.com/privacy/
>
>
>
> --------------------------------------------------------------------------------
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin


pgsql-admin by date:

Previous
From: Silvio Brandani
Date:
Subject: order by query wrong result
Next
From: Scott Ribe
Date:
Subject: Re: order by query wrong result