Subquery question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aaron C

    Subquery question

    I have the following code:

    SELECT DISTINCT StudentID
    FROM Students
    WHERE StudentID != ANY (SELECT StudentID FROM Voted)

    It seems like it's worded correctly, but I keep getting an error
    regarding the second query. Referring to the manual on page
    http://dev.mysql.com/doc/mysql/en/AN...ubqueries.html, I don't
    really see a difference in my wording and manual's. Any ideas what could
    be wrong here?

    Thanks,
    Aaron
  • Aaron C

    #2
    Re: Subquery question

    Please ignore start of this thread...I didn't see that there was a reply
    to the one I sent earlier today before I left. Thanks for replying,
    Agro...it helped me alot.

    Thanks,
    Aaron



    Aaron C wrote:[color=blue]
    > I have the following code:
    >
    > SELECT DISTINCT StudentID
    > FROM Students
    > WHERE StudentID != ANY (SELECT StudentID FROM Voted)
    >
    > It seems like it's worded correctly, but I keep getting an error
    > regarding the second query. Referring to the manual on page
    > http://dev.mysql.com/doc/mysql/en/AN...ubqueries.html, I don't
    > really see a difference in my wording and manual's. Any ideas what could
    > be wrong here?
    >
    > Thanks,
    > Aaron[/color]

    Comment

    Working...