Jeff Moden (8/29/2013)
Sigerson (8/29/2013)
Doing all of that within one SQL statement or a With block is beyond me,...It's beyond me, too. But then again, I wouldn't even try to do it with a single statement. Avoiding the loop or doing something "set based" does [font="Arial Black"]NOT [/font]mean doing it "within one SQL statement or a Withblock". Multiple set-based passes will be much faster than using a loop for this.
I honestly don't understand what you mean by that. What would make it set-based? Is there an article I can chew on to get a grasp of this?
Thanks,
Sigerson
"No pressure, no diamonds." - Thomas Carlyle