Hi Nathan, Subqueries are only available in MySQL as of version 4.1.
On Fri, 29 Oct 2004, Nathan Coast wrote: > Hi > > apologies if this is a dumb question but can you do subqueries in mysql? > > select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID > =2 and UGR.ROLE_ID = (select ROLE_ID from ACL_ROLE where ROLE_NAME = > 'projectmanager' ) > > this query fails, but the individual queries work fine > > select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID > =2 and UGR.ROLE_ID = 3 > > and > > select ROLE_ID from ACL_ROLE where ROLE_NAME = 'projectmanager' > > cheers > Nathan > > -- > Nathan Coast > Managing Director > codeczar ltd > mobile: (852) 9049 5581 > email: mailto:[EMAIL PROTECTED] > web: http://www.codeczar.com > > -- > 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]