Special ORDER BY

Поиск
Список
Период
Сортировка
От Martín Marqués
Тема Special ORDER BY
Дата
Msg-id CABeG9LtRiaAaEULLwxBoud+xcv+HknpFYioUaQYkC2ynq_4t+Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Special ORDER BY
Re: Special ORDER BY
Список pgsql-general
How can I order a result set by a special order of a column. For
example, let's say I have this query


SELECT * FROM subcampo sc JOIN campo c ON (c.codigo = sc.campo)
      WHERE c.etiqueta IN (245, 130, 240, 243, 246, 490, 630, 730, 740)

Now I want to order the result set using c.etiqueta but with the order
of the values as you see in the IN clause.

How can I do that?

--
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

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