List:General Discussion« Previous MessageNext Message »
From:Cal Evans Date:June 6 2002 8:21pm
Subject:RE: sub-queries
View as plain text  
Select monitorhosts.HostID
  from monitorhosts left join monitorhostgroupdetails on
monitorhostgroupdetails.HostID = monitorhosts.HostID
 where monitorhostgroupdetails.HostGroupID !='1';


*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*


-----Original Message-----
From: Chris Knipe [mailto:savage@stripped]
Sent: Thursday, June 06, 2002 2:52 PM
To: mysql@stripped
Subject: Re: sub-queries


Fair enough (and also what I thought)....

Does anyone have any idea how I can implement the below in a similar
"fashion" then?

I have a list of items, and a list of groups.  I want to retrieve all the
items from a table that is not in a specific group...


----- Original Message -----
From: "Kiss Dániel" <niel@stripped>
To: "Chris Knipe" <savage@stripped>; <mysql@stripped>
Sent: Thursday, June 06, 2002 9:47 PM
Subject: Re: sub-queries


> I'm sorry to disappoint you, but subqueries are NOT supported int any
MySQL
> version, yet.
> You can read the MySQL manual about it. You can find there when and how it
> will be implemented.
>
> Bye
>          Daniel
>
> At 21:39 2002.06.06. +0200, you wrote:
> >Lo all,
> >
> >are sub-queries supported on mysql-max 3.23.49 ??
> >
> >If they are, what's wrong with the following statement?
> >
> >SELECT monitorhosts.HostID
> >     FROM monitorhosts
> >    WHERE monitorhosts.HostID NOT IN
> >          (SELECT HostID
> >             FROM monitorhostgroupdetails
> >            WHERE monitorhostgroupdetails.HostGroupID='1');
> >
> >mysql complains about a syntax error right at the begining of the second
> >select...
> >
> >ERROR 1064: You have an error in your SQL syntax near 'SELECT HostID
> >             FROM monitorhostgroupdetails
> >            WHERE monitorh' at line 4
> >
> >ty
> >
> >
> >
> >---------------------------------------------------------------------
> >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 <mysql-thread111241@stripped>
> >To unsubscribe, e-mail
<mysql-unsubscribe-niel=mailbox.hu@stripped>
> >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 <mysql-thread111243@stripped>
To unsubscribe, e-mail <mysql-unsubscribe-cal=calevans.com@stripped>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Thread
sub-queriesChris Knipe6 Jun
  • Re: sub-queriesKiss D├íniel6 Jun
    • Re: sub-queriesChris Knipe6 Jun
      • RE: sub-queriesCal Evans6 Jun
  • Re: sub-queriesSabine Richter6 Jun
  • Re: sub-queriesChris Knipe6 Jun
  • Re: sub-queriesChris Knipe6 Jun
    • RE: sub-queriesKevin Fries7 Jun
      • Re: sub-queriesChris Knipe7 Jun
        • Re: sub-queriesBenjamin Pflugmann7 Jun
      • Re: sub-queriesChris Knipe7 Jun
        • Re: sub-queriesBenjamin Pflugmann7 Jun