> I've worked (and work) on old projects with hundreds
> of SQL queries spread throughout the code,
So have/do I. The fact that there is SQL inlined with the code is probably the least of your worries when talking about such a large/old code base.