• Actually I tried to design it as you described. But it is not that easy, if I want the code reusablity, which my TVF gives me.

    I reuse the same TVF's in a lot of my utility stored procedure procedures. TVF are not easy to convert into dynamic sql, otherwise I would have done it.