在尝试将数据从txt文件加载到数据库时,BULK INSERT TASK会出现以下错误

时间:2015-10-28 16:30:26

标签: sql sql-server tsql sql-server-2012 ssis-2012

BULK INSERT [AG].[dbo].[tblSTAGINGTRANS]
from 'G:\Billing\Files\m2m.txt'
with (FIELDTERMINATOR='¦',ROWTERMINATOR='0x0a',CODEPAGE='ACP');

Msg 4832, Level 16, State 1, Line 1
Bulk load: An unexpected end of file was encountered in the data file.
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)"

我收到以下错误。该文件来自大型机。我想Linux系统。我尝试使用\ r \ n,\ n但没有运气。

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

你的致信后,你是不是错过了第一个\?

BULK INSERT [AG].[dbo].[tblSTAGINGTRANS]
from 'G:\Billing\Files\m2m.txt'
with (FIELDTERMINATOR='¦',ROWTERMINATOR='0x0a',CODEPAGE='ACP');