On Saturday 18 August 2001 14:37, Darragh Duffy wrote:
> > Hi Folks
>
> below is a seltion of queries all doing very similar things I have run all
> on Oracle 7 and 8i and all work fine. but only number 2 works in MySQL. So
> does this suggest that MySQL is not fully compliant with Ansi SQL?
>
>
> The problem seems to lie in the fact that the embedded select does not not
> like multiple values as params. Though it will work if you hard code in
> values. but what the hell is the use of hard coding stuff, everything
> nowadays is param driven.
>
> 1. select count(*) from user_results where res_id in (select res_id from
> user where depart_id = 10)
> 2.select count(*) from user_results x,user y
> where x.res_id = y.res_id and y.depart_id = 10;
> 3.select count(*) from
> user_results y where y.res_id = (select x.res_id from user where
> x.depart_id = 10 and x.user_id = y.user_id);
>
>
> Any Ideas would be appreciated.
Err, RTFM ? ;-)
http://www.mysql.com/doc/C/o/Compatibility.html
Especially:
http://www.mysql.com/doc/M/i/Missing_Sub-selects.html
HTH
Ian Barwick
--
Ian Barwick - Developer - [EMAIL PROTECTED]
akademie.de asp GmbH - http://www.akademie.de
"To query tables in a MySQL database is more fun than eating spam"
---------------------------------------------------------------------
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