sql help

Поиск
Список
Период
Сортировка
От Duncan Adams (DNS)
Тема sql help
Дата
Msg-id C54EF5B83335D311BCB50000C11042B102C8C7CF@vodabemail1.vodacom.co.za
обсуждение исходный текст
Список pgsql-novice
hi all

is there any way of getting around this problem?

SELECT DISTINCT ON (clust.clust) clust.clust where
    clust.clust_id = clust_sys.clust_key
        and
    clust_sys.sys_key = system.key_system
        and
    system.location_key = 61
    order by system.name;

ERROR:  SELECT DISTINCT ON expressions must match initial ORDER BY
expressions

would one create a view or perhaps a temp table, and then do a second query
on that.
although i would prefer to just have one SQL statement.
the system.name will always be unique. there will normally be a number of
systems belonging to the cluster in clust.clust.

thanx
duncan.


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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Storing number '001' ?
Следующее
От: "Duncan Adams (DNS)"
Дата:
Сообщение: Re: sql help