Subqueries aren't supported in MySql prior to ver 4.1.
----- Original Message ----- From: "Becky OGrady" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 15, 2003 12:28 PM Subject: NEWBIE!! need help with nested select query > Hi- > > I have 2 queries that I know work in SQL Server, but I > can't figure out why they won't work with mySQL. > > SELECT email, comments, (select count(*) from guests > where decision=3) as total, (select count(*) from > guests where decision=2) as secondtotal > FROM guests > > AND > > SELECT email, comments, NULL, NULL > FROM guests > UNION > SELECT NULL, NULL, > (SELECT count(*) from guests where decision=3) as > total, (SELECT count(*) from guests where decision=2) > as secondtotal > FROM guests > > The guests table structure: > guest_id int, PK, autoincrement > email varchar(100) > comments varchar(250) > decision int > > Any help would be greatly appreciated!! > > Thanks, Becky > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]