• I agree with you wayne.

    I have a small issue in addition to that, this line gave me error:

    select @MyXMLString = @MyXMLString +

    ' '+ AccountNumber +

    ' '

    This is the error:

    Msg 102, Level 15, State 1, Line 6

    Incorrect syntax near 'AccountNumber'.

    Any idea?