Create CSV file in SSIS

  • I need to setup a SSIS Package that will execute a view then create a csv file into a file location once the view has been executed. Then I need to do the same thing for and XML file. Can anyone lead me in the right direction.

    Thank you,

    Kevin

  • here's a really article example of creating an XML file...

    https://www.simple-talk.com/sql/learn-sql-server/using-the-for-xml-clause-to-return-query-results-as-xml/

    Here's a really simple query on a table I had handy...

    SELECT CompanyID

    , RTRIM(CompanyName) AS CompanyName

    , RTRIM(Address) AS StreetAddress

    , RTRIM(City) AS City

    , RTRIM(State) AS [State]

    , ZipCode

    FROM Company

    FOR XML RAW ('Company'), ROOT('Companies');

    Hopefully that will get you started.

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

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