Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 export

Author  Topic 

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2010-10-26 : 09:39:43
I have a query in sql 2005 that returns results of over 833,000 records. How can I export data of this size so it can be used in access or excel?

vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-10-26 : 09:42:51
Use Result to file option of Query Analyzer.

Vaibhav T

To walk FAST walk ALONE
To walk FAR walk TOGETHER
Go to Top of Page

shaggy
Posting Yak Master

248 Posts

Posted - 2010-10-26 : 09:57:32
use bcp
Go to Top of Page

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2010-10-26 : 14:42:40
what is bcp?
quote:
Originally posted by shaggy

use bcp

Go to Top of Page

revdnrdy
Posting Yak Master

220 Posts

Posted - 2010-10-27 : 00:29:49
BCP is a utility you can use to export a query to a text file..

Here is an example..

BCP Example
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-10-27 : 02:15:21
quote:
Originally posted by jcb267

I have a query in sql 2005 that returns results of over 833,000 records. How can I export data of this size so it can be used in access or excel?


If you use EXCEL versions less than 2007, you need to break records and insert into seperate sheet as maximum rows supported is 65535
Also refer this post
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -