• Very good article, nice testcode. :w00t::cool:

    There may be some testing needed regarding parallelism,

    maybe for now just add a OPTION(MAXDOP 1).

    The only remarks I would add to the conclusion is :

    - Keep in mind that by design there is no order in a setbased approach

    - For now it works and it is the fasted propriatary solution for the problem.

    Remeber the views with order by clause that suddenly nolonger

    externalized the order in SQL2005, but worked so well in SQL2000.

    Thank you for sharing the knowledge.:smooooth:

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me