Change two SQL statements into SQLAlchemy equivalent ones.
Authored by: jruigrok 2007-11-24
Parent: [r6221]
Child: [r6223]