Solved

sql server database export data

Posted on 2013-05-30
3
503 Views
Last Modified: 2013-05-30
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
Comment
Question by:GouthamAnand
  • 2
3 Comments
 
LVL 7

Expert Comment

by:Ross Turner
ID: 39208124
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
 
LVL 7

Accepted Solution

by:
Ross Turner earned 500 total points
ID: 39208145
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
 

Author Closing Comment

by:GouthamAnand
ID: 39209863
Thank you. I copied and pasted in the excel in 3 tabs for 30 million records for excel2010
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now