Finally, are these SQL databases?  The best way of getting information
is with SQL.

SELECT * FROM NumberOfPets
WHERE name IN (SELECT name FROM CatLovers) OR
   name IN (SELECT name FROM DogLovers)
ORDER BY name;

A good way is to use SQL with JOINs instead of horrible nested selects. Although SQL is declarative, you shouldn't make the work of the query optimizer so hard.

Christian

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to