Solved

sql server database export data

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

808 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