Export Table to Excel (1 Viewer)

zezo2021

Member
Local time
Today, 20:06
Joined
Mar 25, 2021
Messages
393
Hello friends

What should I do if the table contains over 3 Million records for example?

should I create 3 views?

and convert it to Excel (each one separately)

or is there an easy solution in SQL SERVER MANAGEMENT STUDIO
 
Assuming you can identify the records by some ID, and you have linked it to Access, write a routine that breaks it down into manageable chunks (say 750,000 records) and use that to export it.

Be warned it won't be quick, no matter how you do it.

Excel has a 1048576 row limit, but files get very unwieldly as they approach this limit.
You could save a CSV out of SSMS - https://dba.stackexchange.com/questions/58533/copy-a-large-data-from-sql-query-result
 
i made a range in criteria to export the ID in batchs
[id] < 1,000,000
[id] between 1,000,001 and 2,000,000
[id] > 2,000,001


DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12xls, "query1", vFile, True,"qry1"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12xls, "query2", vFile, True, "qry2"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12xls, "query3", vFile, True, "qry3"
 

Users who are viewing this thread

Back
Top Bottom