vinita, Thursday, October 03, 2002, 5:56:49 AM, you wrote: vvM> mysql> select userGroup from machineGroup_userGroups where hostname="mulga"; vvM> +-----------+ vvM> | userGroup | vvM> +-----------+ vvM> | staff | vvM> | tech | vvM> +-----------+ vvM> 2 rows in set (0.01 sec)
vvM> mysql> select username from account where loginGroup="staff" OR vvM> loginGroup="tech"; vvM> +----------+ vvM> | username | vvM> +----------+ vvM> | aharwood | vvM> | alistair | vvM> ....................... works fine vvM> BUT vvM> mysql> select username from account where loginGroup IN vvM> -> (select userGroup from machineGroup_userGroups where vvM> hostname="mulga") ; vvM> ERROR 1064: You have an error in your SQL syntax near 'select userGroup vvM> from machineGroup_userGroups where hostname' at line 2 vvM> Both loginGroup & userGroup are VAR(20) vvM> Any idea what is wrong?? Sub-selects isn't implemented in MySQL yet: http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- 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