Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

sql server database export data

I have data from the query like below  which is returning around 2 million records.

select col1, col2 from table1

Now how to export data to an excel?

Also if the table contains more than 30 million records, can we export the data to a flat file? as I think excel cannot hold more than 65000 records?

Thanks.
0
GouthamAnand
Asked:
GouthamAnand
  • 2
1 Solution
 
Ross TurnerManagement Information Support AnalystCommented:
What version of Excel ?

also you can pull data straight into excel
http://office.microsoft.com/en-gb/excel-help/connect-to-import-sql-server-data-HA010217956.aspx

30 million records in a flat file is a bad idea.... it would be huge and probably crash before you would ever be able to open it.
0
 
Ross TurnerManagement Information Support AnalystCommented:
Pre-Excel 2007 rows are limited to  65,536 rows by 256 columns

and  excel 2007 + rows are limited to 1,048,576 rows by 16,384 columns
0
 
GouthamAnandAuthor Commented:
Thank you. I copied and pasted in the excel in 3 tabs for 30 million records for excel2010
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now