BCP OUT:----导出的文件位于数据库服务器本地
EXEC xp_cmdshell 'bcp "SELECT * FROM [Metrochina_arc_May].[dbo].LotTestTemplateXChip WHERE LotID IN (SELECT LOTID FROM [Metrochina_arc_May].[dbo].TEMPLotTestTemplateXChip) " queryout C:\LotTestTemplateXChip.txt -T -n '
Bulk Insert:
BULK INSERT MetroChina.dbo.LotEquipment FROM '\\neosz03\Shipments\In\Manual\LotEquipment.txt' WITH (DATAFILETYPE='native', KEEPIDENTITY)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16754036/viewspace-706243/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16754036/viewspace-706243/