ORDER BY FIELD feature

Поиск
Список
Период
Сортировка
От Kevin Reynolds
Тема ORDER BY FIELD feature
Дата
Msg-id 536769.18955.qm@web44903.mail.sp1.yahoo.com
обсуждение исходный текст
Ответы Re: ORDER BY FIELD feature
Список pgsql-general
Does postgresql have something similar to the ORDER BY FIELD feature found in MySQL?
 
Something like ORDER BY FIELD(ID, 10, 2, 56, 40);
 
 
I am using the Sphinx Search program, www.sphinxsearch.com, and it returns a list of IDs ordered by relevance.  I take the array it gives me and create a comma separated list which is used in a postgres query using the WHERE "ID" IN (10, 2, 56, 40) statement.  I would like to order the result by the order of the list.
 
Thanks.


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

В списке pgsql-general по дате отправления:

Предыдущее
От: "Gurjeet Singh"
Дата:
Сообщение: Re: Scripting function definitions as SQL?
Следующее
От: "D. Dante Lorenso"
Дата:
Сообщение: Returning RECORD from PGSQL without custom type?