Re: order by query wrong result

Поиск
Список
Период
Сортировка
От jayknowsunix@gmail.com
Тема Re: order by query wrong result
Дата
Msg-id CB75D42A-9FCD-46D7-AF05-F005BF820385@gmail.com
обсуждение исходный текст
Ответ на order by query wrong result  (Silvio Brandani <silvio.brandani@tech.sdb.it>)
Ответы Re: order by query wrong result  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список 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 по дате отправления:

Предыдущее
От: Silvio Brandani
Дата:
Сообщение: order by query wrong result
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: order by query wrong result