Multiple '<>' on OR condition not working

Поиск
Список
Период
Сортировка
От Francisco Reyes
Тема Multiple '<>' on OR condition not working
Дата
Msg-id 20011209141905.K32574-100000@zoraida.natserv.net
обсуждение исходный текст
Список pgsql-novice
I have a query with the 'where' conditions as follows:
where he.horse = comp.horse and he.fd = comp.fd and
        (
        comp.cm_start           <> he.lstart    or
        comp.cm_win             <> he.lwin      or
        comp.cm_place           <> he.lplace    or
        comp.cm_show            <> he.lshow     or
        comp.cm_earnings        <> he.learnings
        )
and extract(year from lstat_date) >2000  and lstart < 20 limit 30;

The part that is not working is the series of 'or'. I have two tables for
which most records are the same; I looking for differences.

What I am getting from the query above is identical records matched (i.e.
horse,fd, start, win, place, show and earnings are the same).

Any suggestions?


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

Предыдущее
От: Francisco Reyes
Дата:
Сообщение: Re: Disk space problem...
Следующее
От: Rasputin
Дата:
Сообщение: securing Postgres