Link to home
Start Free TrialLog in
Avatar of GouthamAnand
GouthamAnand

asked on

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.
Avatar of Ross Turner
Ross Turner
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
ASKER CERTIFIED SOLUTION
Avatar of Ross Turner
Ross Turner
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GouthamAnand
GouthamAnand

ASKER

Thank you. I copied and pasted in the excel in 3 tabs for 30 million records for excel2010