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]

Reply via email to