In fact this does not return me what I want :

If I have the tables
Tactic
teamCode 1
teamCode 2
teamCode 3
teamCode 4

Game
teamCode1 1 teamCode2 3 GameTurn 1
teamCode4 1 teamCode2 3 GameTurn 1

Turn 
Code 1

My request would return me nothing
while your request would return me
different sets with at least
Tactic.teamCode 2 / Game.TeamCode1 1 / Game.TeamCode2 3 / GameTurn 1

So your answer is not right at all.

Does someone has a clue ?

Cedric Lefebvre

> Something like
> 
> SELECT Tactic.teamCode
> FROM Tactic t, Game g, Turn r
> WHERE t.teamCode <> g.teamCode1
> AND t.teamCode <> g.teamCode2
> AND g.gameTurn = r.code;
> 
> ...and even the table "Turn" may not be necessary, depending 
> on the values
> in your tables and what you want to do with it.
> 
> 
> ----- Original Message -----
> From: "Lefebvre, Cedric" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, May 28, 2001 14:41
> Subject: SQL Problem
> 
> 
> > I have a problem adapting a multiple select to MySQL.
> > Can someone help me ?
> >
> > Here is my request (Oracle format)
> >
> > SELECT Tactic.teamCode FROM Tactic WHERE
> > Tactic.teamCode NOT IN (SELECT Game.teamCode1 FROM Game, Turn WHERE
> > Game.gameTurn = Turn.code)
> > AND Tactic.teamCode NOT IN (SELECT Game.teamCode2 FROM 
> Game, Turn WHERE
> > Game.gameTurn = Turn.code);
> >
> > I could use the following one, if it's easier to translate to MySQL
> > SELECT Tactic.teamCode FROM Tactic WHERE
> > Tactic.teamCode NOT IN (SELECT Game.teamCode1 FROM Game, Turn WHERE
> > Game.gameTurn = 3)
> > AND Tactic.teamCode NOT IN (SELECT Game.teamCode2 FROM 
> Game, Turn WHERE
> > Game.gameTurn = 3);
> >
> > Thanks
> >
> > Cedric Lefebvre
> >
> > 
> ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: 
http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to