how to return an XML query as one field

  • You mean like this? Or am I missing something?

    DECLARE @X XML

    SELECT @X = ( SELECT * FROM sampleTable FOR XML AUTO )

    SELECT @X as [@X]

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • yup, that one did the trick! thanks mate.

  • Happy to help. 🙂

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 3 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply