Solved

sql server database export data

Posted on 2013-05-30
3
508 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server stored proc 2 19
Sql query 107 59
space used inside SQL data file- PerfMon counter.. 2 25
SQL BULK INSERT Comma Delimited Issue 8 48
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

785 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