Re: [GENERAL] Complex query need help with OR condition.

2004-10-26 Thread Jaime Casanova
--- Ken Tozier <[EMAIL PROTECTED]> escribió: > I'm working on a query which works as expected when > I leave out one of > the "OR" tests but when the "OR" is included, I get > hundreds of > duplicate hits from a table that only contains 39 > items. Is there a way > to write the following so th

Re: [GENERAL] Complex query need help with OR condition.

2004-10-24 Thread Ken Tozier
On Oct 25, 2004, at 12:35 AM, Tom Lane wrote: Ken Tozier <[EMAIL PROTECTED]> writes: When I add the OR clause things go haywire: SELECT a.paginator, a.doc_name, (b.time - pm_events.time) as elapsed_time FROM pm_events as a, pm_events as b WHERE a.event_code='pmcd' OR a.event_code='

Re: [GENERAL] Complex query need help with OR condition.

2004-10-24 Thread Tom Lane
Ken Tozier <[EMAIL PROTECTED]> writes: > When I add the OR clause things go haywire: > SELECT a.paginator, a.doc_name, (b.time - pm_events.time) as > elapsed_time FROM pm_events as a, pm_events as b > WHERE a.event_code='pmcd' > OR a.event_code='pmop' > AND b.event_code='pmcl' >