Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sql server database export data

Posted on 2013-05-30
3
Medium Priority
?
522 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 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

972 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