where clauses

Поиск
Список
Период
Сортировка
От paul butler
Тема where clauses
Дата
Msg-id T5dff17b117ac1785ed21a@pcow035o.blueyonder.co.uk
обсуждение исходный текст
Список pgsql-novice
Thanks Rob,
original sees orgname as ambiguous so a little aliasing does nicely


SELECT     u1.orgname
FROM        users AS U1 INNER JOIN users AS U2 ON
U1.orgname = U2.orgname
WHERE        U1.usertype='Drug Addiction' AND
U2.userType='Alcohol Addiction'

The only trouble is that it's going to require about 20 joins now to
handle all the attributes. But that's life.

An 'or' clause returns results from either condition so not applicable

Cheers

Paul Butler

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

Предыдущее
От: "Erwan DUROSELLE"
Дата:
Сообщение: Rép. : where clauses with and
Следующее
От: "Jules Alberts"
Дата:
Сообщение: Re: char() or varchar() for frequently used column