*MWAH*!!!!!!!!!!! Thanks a million, tested and working beautifully.... Can't believe in two days I didn't think of this...
-- me ----- Original Message ----- From: "Sabine Richter" <[EMAIL PROTECTED]> To: "Chris Knipe" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, June 06, 2002 10:14 PM Subject: Re: sub-queries > SELECT monitorhosts.HostID > FROM monitorhosts, monitorhostgroupdetails > WHERE monitorhosts.HostID = monitorhostgroupdetails.HostID > AND monitorhostgroupdetails.HostGroupID != '1'); > > Gruss > Sabine > > Chris Knipe 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 <[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