Sql query output to XML or HTML file

  • I am a newbie to SQL and I would like to know how can I save the SQL SP query output to an XML or directly to an HTML file ? I need to know how it can be done programatically as I need to generate about 5K-8K reports changing 3 input variables in the SP.

    The Stored Procedure and output can be viewed in the image below

    http://www.fiu.edu/~atmakurk/kk/results.jpg

    The input variables that change are @District, @Month and @RepType.

    I would appreciate if anyone can guide me or provide me with link to an article or example on how its done.

    Thanks

    KK

  • the easiest way to output structured XML in 2005 is the FOR XML PATH syntax.  have a look at that in BOL.

    ---------------------------------------
    elsasoft.org

Viewing 2 posts - 1 through 1 (of 1 total)

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