mickyT (2/27/2013)
Why? Please don't say "for performance reasons" until you've actually tested it. I tested all of the solutions offered so far and there's virtually no difference. Try it yourself. Here's a million row test table...
Sorry Jeff, I wasn't suggesting them for performance reasons, just other ways of doing it. I found the method the OP put up originally difficult to decipher at first glance.
Ah. Got it. Thanks for the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.