HOw to export Data into CSV from database tables

  • can anyone provide me the steps to create a csv file which should consist data from more than one tables.In csv there should be a Table name as header before the records.

    Thanks in advance

  • i am assuming that you have ssis as a tool to help build your requirement.

    with that said, create a package that will have a data flow task

    create a data connection object that will connect to your database

    create an data source using the data connection object and use the SQL command and type in your query that you want to export.

    create a flat file connection listing out the path of where the file will exist and select a type of CSV

    add a flat file destination object into the data flow task

    connect the data source object to the flat file destination object listing out the mappings of the fields from the source to the destination

    this is a very basic set of steps to do to produce what you are asking. from here you can get more advanced regarding data validation of what to export, what new columns from an auditing perspective you want to add to the export, so forth and so on.

    hth

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

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