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.
| Author |
Topic |
|
xrum
Yak Posting Veteran
87 Posts |
Posted - 2010-02-17 : 14:58:36
|
| hi,i have a table with over 6K records,i'm trying to extract them to excel, but it seems like its too much data, and i go into timeout mode.what i'm trying to do is:read the first 2k records - export to excel then start with the next 2k, etc.I'm not really sure where to begin on this.1. I count the number of records. 2. if the number i get is less then 2k then i just read them as is (this is working)3. if the number is larger then 2k then i need to read the first 2k, and then start reading the second part, starting with 2001 (this is where i'm stuck)how do i tell it to start giving me records starting with number 2001? or 4001? etc?Thanks! |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-02-17 : 16:29:38
|
How do you make your export to excel?6k records is like nothing in sql server. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-18 : 00:52:14
|
| http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2010-02-18 : 08:03:32
|
| If your server is 64 bit, and if you are using openrowset commands like in the examples in the link Vishakh gave, you may run into problems. I don't recall whether it was timeout or whether it just fails with an error message. The failure has to do with Jet drivers not being available for 64-bit servers.If you are trying to fill an Excel sheet from an Excel macro, lookup http://support.microsoft.com/kb/306125 |
 |
|
|
|
|
|
|
|