On Thu, Oct 23, 2003 at 14:17:08 -0400,
[EMAIL PROTECTED] wrote:
>
> I can't do the following, since the number of selected columns have to match:
One option is to use where NOT EXISTS instead of EXCEPT. Another way would
be to add A.id to the rows in the set difference using a join. I expect
Wouldn't that return every A.id ? since A.id would be compared to -1, and the wouldnt'
be the same.
I want:
select min(A.id) such that A.charge, B.userid, C.employee_id in
(
select A.charge
, B.user_id
, C.employee_id
from A
inner join B using (user_id)
inner join C using (employe
On Thu, 23 Oct 2003 [EMAIL PROTECTED] wrote:
> I'm interested in finding the minimim A.id such that the following holds:
>
> select A.charge
> , B.user_id
> , C.employee_id
> from A
> inner join B using (user_id)
> inner join C using (employee_id)
>
> except
>
> select X.charge
> ,
Thank you to everyone with their suggestions.
Where on the PostgreSQL site would I have found more info on the NOT EXISTS
At 11:20 AM 12/27/00 -0500, you wrote:
>What do I have to do a query where information in table1 is not in table2
>
>I am looking for something like
>
>Select table1.firs
"Brian C. Doyle" wrote:
> What do I have to do a query where information in table1 is not in table2
>
> I am looking for something like
>
> Select table1.firstname where table1.firstname is not in table2.firstname
> and table2.date='yesterday'
>
> I tried
> Select table1.firstname where table1.fi
Hello Brian,
Wednesday, December 27, 2000, 9:20:53 PM, you wrote:
BCD> What do I have to do a query where information in table1 is not in table2
BCD> I am looking for something like
BCD> Select table1.firstname where table1.firstname is not in table2.firstname
BCD> and table2.date='yesterday'
Hi Brian,
Try something like this:
SELECT firstname FROM table1 WHERE firstname NOT IN (SELECT firstname
FROM table2 WHERE table2.date='yesterday'::date);
Hope this helps.
Francis Solomon
>
> What do I have to do a query where information in table1 is
> not in table2
>
> I am looking for some