For me this "challenge" resulted in the following tick points:
MS-Sql in this task was not "better" as much as another thread hinted atNot sure I concur with that. While it can be done from both tools, the fact that MySQL's LIMIT is "limited" to numeric constants, means that dynamic-SQL is required. I've demonstrated that MS-SQL can handle things in straight SPs without needing dynamic SQL...so it's ironic that claims have been made in the past that SPs in MS SQL are not "flexible".
Using enhancements of SQL makes sense from a coding difficulty POV I 'think' I agree with you, if I'm understanding you correctly. :)
, the above point is a strong argument in favor of either code generation or generated SP's. I agree - I'm a strong proponent of generating SPs.