Re: SQL Order Question

Поиск
Список
Период
Сортировка
Искать
От
George Weaver
Тема
Re: SQL Order Question
Дата
в 18:08:06
Msg-id
003301c66fb6$6f9effe0$6400a8c0@Dell4500
Список
Дерево обсуждения
SQL Order Question <operationsengineer1@yahoo.com>
Re: SQL Order Question Bruno Wolff III <bruno@wolff.to>
Re: SQL Order Question "Andrej Ricnik-Bay" <andrej.groups@gmail.com>
Re: SQL Order Question <operationsengineer1@yahoo.com>
Re: SQL Order Question Richard Broersma Jr <rabroersma@yahoo.com>
Re: SQL Order Question <operationsengineer1@yahoo.com>
Re: SQL Order Question Bruno Wolff III <bruno@wolff.to>
You might be able to achieve what you want using the fact that Order By 
sorts false before true, so:

    Order By not(contractid = 'BTS'), contractid ASC

Regards,
George

----- Original Message ----- 
From: 
To: 
Sent: Thursday, May 04, 2006 1:33 PM
Subject: [NOVICE] SQL Order Question


> hi all,
>
> i want to order contract numbers id ascending order,
> with the exception of 'BTS' that I want to display
> first.  the contract numbers are numeric and 'BTS' is
> text.  the numeric values come first when i sort in
> asc order - as expected.  how can i get BTS (id = 0)
> to come up as the first value in my query?
>
> tia...
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq
> 


В списке pgsql-novice по дате отправления
От:
Дата:
Сообщение: Re: SQL Order Question
От: Joao Miguel Ferreira
Дата:
FAQ