• That what a "quirky update" is about...

    But!

    To make it bullet-proof you need to read J.Moden article and see what else should be added into your query, so it will always work properly (eg. clustered index and MAXDOP 1).

    Otherwise, you may find surprising that sometimes you will end up with unexpected results...

    _____________________________________________
    "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]