• 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.


    Over 12yrs in IT and 10yrs happily stuck with SQL.
    - SQL 2008/R2/2012/2014/2016/2017
    - Oracle 8/9/10/11
    - MySQL 4/5 and MariaDB