: Re: Help with SELECT, JOIN and WHERE query
From: Stefan Hinz, iConnect \(Berlin\)
Date: Wed, 29 Jan 2003 00:02:22 +0100
Victor,
good shot! I thought of this one in the first place:
SELECT u.user_id
FROM user_profile u
LEFT JOIN team_member t
ON u.user_id = t.user_id
WHERE t.team_id <>
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 5:30 PM
Subject: RE: Help with SELECT, JOIN and WHERE query
SELECT u.user_id
FROM user_profile u
LEFT JOIN team_member t
ON u.user_id = t.user_id
WHERE t.team_id <> 2
-Original Message-
From: heiko
WHERE team_member.user_id IS NULL
William R. Mussatto wrote:
Hi,
I got a difficult problem with a SELECT query:
In my application there are two tables, one for all users (user_profile)
one for a user-in-team relation.
I want to know, which user is still not in a speciffic team. Users can
be
> Hi,
>
> I got a difficult problem with a SELECT query:
>
> In my application there are two tables, one for all users (user_profile)
> one for a user-in-team relation.
>
> I want to know, which user is still not in a speciffic team. Users can
> be in more than one team, but we don't care about tha
SELECT u.user_id
FROM user_profile u
LEFT JOIN team_member t
ON u.user_id = t.user_id
WHERE t.team_id <> 2
-Original Message-
From: heiko mundle [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 28, 2003 8:08 AM
To: [EMAIL PROTECTED]
Subject: Help with SELECT, JOIN and WHERE query
Hi,
I
Hi,
a query like this should do the job
select user_profile.user_id from user_profile left join team_member on
(team_member.user_id=user_profile.user.id and team_member.team_id=2) where
team_member.user_id is NULL;
Dobromir Velev
[EMAIL PROTECTED]
www.websitepulse.com
- Original Message ---