Adam Seniuk (11/8/2012)
Michael Meierruth (11/8/2012)
Adam,There is something not right with your 'exec' statment with all those quotes and parenthesis. Can't quite grasp what it is.
But I definitely like this 'with TABLERESULTS' clause. This definitely makes it all a lot easier.
Thanks.
oops, I must have copied it from a script that is running dynamic queries already. just swap out the '' to ' and it should work.
Superb! It works like a charm! And it's definitely better than my awful hack.