• Working with very large datasets (in one of the largest datawarehouse implementations based on SQLServer in the world) we found that from performance point of view it always better to do desired stuff in in-line SQL (doesn't metter how large and messy it is). If it's not possible than as CLR function. We achieved perfomance boost when we replaced all UDF functions we had with CLRs.

    So, I would suggest to use :

    1. In-line SQL

    2. CLR

    3. UDF

    Cheers,

    Me

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]