简体   繁体   English

如何在sql server 2005中批量导出记录?

[英]How to Export Records in batches in sql server 2005?

As already said in the title, how do i export a table into Excel file but into batches? 正如标题中已经说过的,如何将表导出到Excel文件中但是批量导出? I have total 300 thousands records in one table. 我在一张桌子上共有30万条记录。 I exported it into Excel but when it hit the 65536 records in Excel, operation failed. 我将其导出到Excel但是当它在Excel中达到65536条记录时,操作失败。 (may be coz of limit of rows in excel). (可能是excel中行的限制)。 So how to get around with this situation? 那么如何解决这种情况呢?

All i need is a table exported from one server and imported it into another server. 我只需要一个从一个服务器导出的表并将其导入另一个服务器。 I can't use Linked Server coz of limitation of VPNs (both servers are on different VPN network). 我不能使用VPN限制的链接服务器(两个服务器都在不同的VPN网络上)。

Export to a CSV file instead of an XLS - there's no size limit in CSVs. 导出为CSV文件而不是XLS - CSV中没有大小限制。 I get 10 GB+ CSV files from my clients on a regular basis. 我定期从客户那里获得10 GB + CSV文件。

Yes that is a limitation of Excel in any version eralier than 2007. 是的,这比任何比2007更早的版本的Excel都有限制。

If you are going from one server to another server, it is silly to use Excel anyway as it has all kinds of bad issues with data conversion. 如果你要从一台服务器转到另一台服务器,那么使用Excel是很愚蠢的,因为它有各种各样的数据转换问题。 Use a pipe delimted text file and life will be much better. 使用管道分隔的文本文件,生活会好很多。 Frankly SSIS is so bad at handling Excel, we try very hard to get clients to accept a text file even if the file is going to a person who wants to play with it in Excel (Excel can easily open a text file.) 坦率地说,SSIS在处理Excel方面非常糟糕,我们非常努力让客户接受文本文件,即使文件是指想要在Excel中使用它的人(Excel可以轻松打开文本文件。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM