|
This is a script job, because iterative. There’s a chance you could do it with SQL, but life is short. (And would it be quicker? No.) So, if you can provide data, a script could be had. (But probably, given the time involved, should be paid for.) (I am also looking at Dan, who has already solved this well.)
|