Will Lowe wrote:
Select User_Account from Users as a, Devices as b WHERE a.User_Account = (Select DISTINCT(b.Device_Account) from b.Devices WHERE b.Device_Name LIKE 'HP%' )
I'm running 3.23.49 which I know is not the most current..it was installed
3.x does not support subselects ("select x from (select y from ...)"). You'll need to upgrade to 4.1.
But 4.1 is alpha, so he may not want to do that (though it would be a good idea to upgrade to 3.23.58 or 4.0.17). In that case, the solution is to replace the subselect with a join, which may even be more efficient. Try:
SELECT User_Account FROM Users AS a, Device_Name from Devices AS b WHERE a.User_Account = b.Device_Account AND b.Device_Name LIKE 'HP%'
See <http://www.mysql.com/doc/en/Rewriting_subqueries.html> for more.
Michael
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]