Re: Help on Select/Join

2003-12-30 Thread Bob Terrell
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

Re: Help on Select/Join

2003-12-30 Thread Bjoern Wuest
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

Help on Select/Join

2003-12-29 Thread Bjoern Wuest
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 |

Re: Help on Select/Join

2003-12-29 Thread Roger Baklund
* 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

2003-01-29 Thread heiko mundle
: 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

Help with SELECT, JOIN and WHERE query

2003-01-28 Thread heiko mundle
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:

Re: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread Dobromir Velev
- 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

Help with SELECT, JOIN and WHERE query

2003-01-28 Thread Richard Joyce
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

RE: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread Victor Pendleton
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

Re: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread William R. Mussatto
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

Re: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread gerald_clark
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

Re: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread Stefan Hinz, iConnect \(Berlin\)
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