Re: [GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Tim Vadnais
Subject: Re: [GENERAL] Issue with adding ORDER BY to EXCEPT. On Tue, Jun 07, 2005 at 12:42:47PM -0500, Scott Marlowe wrote: > On Tue, 2005-06-07 at 12:16, Jaime Casanova wrote: > > I suppose this is because the columns in the except are the same that > > the ones in the main select and t

Re: [GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Martijn van Oosterhout
On Tue, Jun 07, 2005 at 12:42:47PM -0500, Scott Marlowe wrote: > On Tue, 2005-06-07 at 12:16, Jaime Casanova wrote: > > I suppose this is because the columns in the except are the same that > > the ones in the main select and the order by get confused. > > > > i'm redirecting to hackers to know if

Re: [GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Scott Marlowe
On Tue, 2005-06-07 at 12:16, Jaime Casanova wrote: > > SELECT encounter.encounter_id, encounter_d.encounter_d_id > > FROM encounter > > JOIN encounter_d on encounter_d.encounter_id = encounter.encounter_id > > EXCEPT > > SELECT encounter.encounter_id, encounter_d.encounter_d_id > > FROM encounter >

Re: [GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Jaime Casanova
> SELECT encounter.encounter_id, encounter_d.encounter_d_id > FROM encounter > JOIN encounter_d on encounter_d.encounter_id = encounter.encounter_id > EXCEPT > SELECT encounter.encounter_id, encounter_d.encounter_d_id > FROM encounter > JOIN encounter_d on encounter_d.encounter_id = encounter.enco

[GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Tim Vadnais
Hi all, I've got myself into a vicious loop that I can't seem to get out of. I have paired down the query for debugging this particular problem that I'm having. What I'm trying to do is find all 'encounters' that have no matching record in 'p_l_d' for a date range. My first SELECT pulls all 'en