• John Cuthbertson (6/14/2010)


    Jason

    Looks like you have done some good work.

    However, I tried to run the stored procedure and got....

    Msg 6841, Level 16, State 1, Procedure who4, Line 28

    FOR XML could not serialize the data for node 'processing-instruction(definition)' because it contains a character (0x0000) which is not allowed in XML. To retrieve this data using FOR XML, convert it to binary, varbinary or image data type and use the BINARY BASE64 directive.

    I will try and debug if/when I get time, If any anyone else has a solution already then tell me!

    First - thanks.

    Second, what version and patch level of SQL Server? I have not encountered this in my testing.

    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