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