Обсуждение: where clauses

Поиск
Список
Период
Сортировка

where clauses

От
"paul butler"
Дата:
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