• The concern is that functions tend to hurt performance quite a bit. Although they might improve readability, they have a tendency to take the ability to leverage things like indexing away from the optimizer, so your queries tend to run quite a bit slower. And that's not so much a CLR vs T-SQL issue - that's kind of "built-in" to functions using inputs from the row.

    The recommendation then tends to become - build the functionality of the function into the queries you need. They will usually run a LOT faster.

    Of course - if you are using the function to create stuff that can be stored and will remain - that's also great. Quite honestly - disk space is cheap these days, so if this can be calculated once and stored, and then referred to later - go for it. just treat it like any other table - index it, etc...

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?