on 12/29/03 12:00 PM, Bjoern Wuest wrote:
Hello
I have the following problem:
Table1 'pl':
+---+---+
| p | o |
+---+---+
Table2 'ln':
+---+--+---+
| p | l | v |
+---+--+---+
Now my problem: how to write a statement to select all 'p' and 'v' from 'pl'
and 'ln' where
Dear all,
thank you very much for the fast and numerous responses. The idea of Roger
Baklund does exactly what I want. Thank you very much Roger.
I oversee the possibility to use IF conditions on MySQL server, this is what
I wanted to do programmatically but to do in the DB server is ok. Let's
Hello
I work on this problem for three days now and could not find any tip in any
manual, book, tutorial or search engine.
I have the following problem:
Table1 'pl':
+---+---+
| p | o |
+---+---+
| 1 | 1 |
| 2 | 1 |
| 3 | 2 |
+---+---+
Table2 'ln':
+---+--+---+
| p | l | v |
* Bjoern Wuest
I work on this problem for three days now and could not find any
tip in any manual, book, tutorial or search engine.
I have the following problem:
Table1 'pl':
+---+---+
| p | o |
+---+---+
| 1 | 1 |
| 2 | 1 |
| 3 | 2 |
+---+---+
Table2 'ln':
+---+--+---+
|
: 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 2
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 that.
Example:
-
From: heiko mundle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 16:08
Subject: Help with SELECT, JOIN and WHERE query
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
If you have mySql 4 use a sub-query
select user_id
from user_profile
where user_id not in (select user_id
from team_member
where team_id = 2)
Hi,
I got a difficult problem with a SELECT query:
In my application there are two tables, one for all
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,
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 that.
What
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
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 mundle [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 28, 2003 8:08 AM
To: [EMAIL PROTECTED]
Subject
12 matches
Mail list logo