good day, After running query (select * from ROSS )I received 20 lacs rows,now those can not be exported to xl/csv....since xl has 10 lacs rows limitation.and even if I try to export it to xl/csv only 10 lacs rows getting saved Is there any command which give me records between 10lac and 20 lac row?to export remaining records? rgds,
Dont use select * in SSMS to export data. You would be much better off using SSIS to manage the extract and creation of the csv file. If you want a wizard to guide you through the steps then right click on your database and choose Tasks... Export Data. It will take you through the steps to export the data you want into a csv of your choice.
If you've not got a handy ID field, you could use a partitioning function. Something like: WITH RowNumberedCTE AS ( SELECT Field1, Field2, Field3, ROW_NUMBER() OVER (ORDER BY Field1) AS RowNumber FROM TableName ) SELECT Field1, Field2, Field3 FROM RowNumberedCTE WHERE RowNumber between 1 AND 10000 -- change this to get the next trenche of data ORDER BY RowNumber
If you have excel 2010, install the power pivot extension from [here] Export your data to a text file then import to power pivot, it can handle millions of rows with highly efficient columnar compression. :