Home > OS >  Retrieving and exporting millions of rows from SQL Server
Retrieving and exporting millions of rows from SQL Server

Time:11-13

The company that I work for recently moved all of our medical claims onto a SQL Server database, and we now need software to retrieve these records and export them to a csv or txt file. Presently, our claims table has 11 million records but this increases daily.

Can this be done in Desktop BI, Power BI, Desktop Excel, or SQL Server Management Studio? I know that sheets in Desktop Excel have a cap at 1.2M rows, but we're thinking of loading into a data model and exporting that way (perhaps with DaxStudio).

Thank you.

CodePudding user response:

You dont need Power BI or DaxStudio, exporting to CSV can be achieved within SQL Server Management Studio.

  • Right click on a database -> Tasks -> Export Data Export Data

  • Select your data source, probably using SQL Server Native Client. Input Server Name, Authentication details, and Database name

  • On the Destination tab, select Flat File, and enter a name / location and select file type of csv

CSV Destination

  • Select "Copy data from one or more tables"
  • Select your table to export and configure the csv output as needed CSV formatting
  • On the next screen Run Immediately (you can also generate a rerunnable package from here) and Finish
  • Related