Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Query inside a query

metalhurmetalhur Member Posts: 1
Hello,

I need to run a query inside a query to return the record that are not in the sub query.

Query :
=========
SELECT
joueurs.nom, joueurs.prenom, joueurs.surnom, joueurs.telephone, joueurs.auto
FROM
joueurs
WHERE
joueurs.auto NOT IN (
SELECT
participation.joueur
FROM
participation, party
WHERE
participation.party = party.auto AND UNIX_TIMESTAMP(party.pdate) >= 1081137600);

How can I solve my problem?

Thanks to all :)

Comments

  • ITAITA Member Posts: 463


    : =========
    : SELECT
    : joueurs.nom, joueurs.prenom, joueurs.surnom, joueurs.telephone, joueurs.auto
    : FROM
    : joueurs
    : WHERE
    : joueurs.auto NOT IN (
    : SELECT
    : participation.joueur
    : FROM
    : participation, party
    : WHERE
    : participation.party = party.auto AND UNIX_TIMESTAMP(party.pdate) >= 1081137600);

    I think MySQL 4.1 supports this type of 'query nesting'. Download and get a copy of that. As for solving the problem - haven't you already solved it by writing the query? - Just stick the query into MySQL 4.1.

    Hope this helps.

    ITA

Sign In or Register to comment.