From: | Francisco Reyes <lists(at)natserv(dot)com> |
---|---|
To: | Pgsql Novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Multiple '<>' on OR condition not working |
Date: | 2001-12-09 19:31:16 |
Message-ID: | 20011209141905.K32574-100000@zoraida.natserv.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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?
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Lockwood | 2001-12-10 08:42:58 | Can anybody help me with SQL? |
Previous Message | Aarni Ruuhimäki / Megative Tmi / KYMI.com | 2001-12-09 18:29:18 | Fwd: Backup automation |