• Kristian Ask (4/28/2010)


    Roman Vinnik (4/27/2010)


    The indentation uses some weird characters. In my case I pasted it into an advanced text editor and they came up with question marks. I just replaced the question marks with spaces and it worked great.

    Also, if you want to run this in MSSQL 2000, replace the table variable with a temporary table (ie. @dbcctab becomes #dbcctab)

    Thanks for getting this cleared up... my first post using the required sql server central script plugin and it for some reason changed it to some wierd characters.

    Anyone know why this is happening as I was only copy-pasting from SSMS?

    That problem happens frequently.

    A simple solution is to copy to notepad++ and then to SSMS after copying from SSC.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events