• One caveat... SQL Server will create a reusable execution plan for the stored procedure but will treat the "text" code as ad-hoc and will need to create a new plan any time a parameter value changes.

    As a side bonus, the code is easier to maintain when it's not burried in RDL files.