If you want to be a bit more generic you could do something like this:Why not combine them into a single intriguing non-equijoin?
# store the desired OS ID into a variable SELECT @desired_id := os_id FROM os_table WHERE os_name = "win nt";
# now find the solutions that match with the os_id
SELECT o.os_id, o.os_name, s.os_code, s.solution
FROM os_table o, solution_table s
WHERE (o.os_id & s.os_code) = @desired_id;
SELECT * FROM os_table o, solution_table s WHERE (o.os_id & s.os_code) = o.os_id AND o.os_name = "win nt";
Bruce Feist
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]