ORDER BY in UNION query

Поиск
Список
Период
Сортировка
От Antony Paul
Тема ORDER BY in UNION query
Дата
Msg-id 2989532e0501100413665c136c@mail.gmail.com
обсуждение исходный текст
Ответы Re: ORDER BY in UNION query  (Richard Huxton <dev@archonet.com>)
Re: ORDER BY in UNION query  (John Sidney-Woollett <johnsw@wardbrook.com>)
Список pgsql-general
Hi,
    I need to use ORDER BY clause in a UNION query and the Order BY
columns are not included in the SELECT statement. I tried like this

(select .... from a) UNION (select ..... from b) order by a.ename;

It says that
ERROR:  Attribute "ename" not found

How to do this.

rgds
Antony Paul

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: handing created and updated fields
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: handing created and updated fields