为什么所有数据都没有插入到行中?

问题描述:

我在excel(csv文件)工作簿中有1048576行r.我使用大容量插入将dis导入到我的数据库表中.代码被赋予波纹管.当我执行dis代码时,它显示1048576行r受了影响,但是999999我的数据库表中只有数据.
为什么?感谢advans!








批量插入dbo.TT32CU
来自''C:\ CZGTECH \ DATABASE \ ttcu.CSV''
WITH
(
FIELDTERMINATOR ='','',
ROWTERMINATOR =''\ n'',

I''ve 1048576 rows r in my excel (csv file) workbook.i used bulk insert to import dis to my db table.code is given bellow.when I execute dis code it shows 1048576 rows r affected.but 999999 datas onli in my data base table.
why?thanks in advans!








BULK INSERT dbo.TT32CU
FROM ''C:\CZGTECH\DATABASE\ttcu.CSV''
WITH
(
FIELDTERMINATOR = '','',
ROWTERMINATOR = ''\n'',

我们怎么知道?我们看不到您的数据! :laugh:

因此,首先要找出未插入的 行.将您的输入与输出进行比较,找出缺少的内容.然后,您就可以开始对原因进行推断了.在那之前,所有猜测都是可行的.

在您问:不,我不要您的表格或CSV文件"之前,这取决于您!
How would we know? We can''t see your data! :laugh:

So start by finding out which rows are not inserting. Compare your input with your output and find out what is missing. Then you are in a position to start making inferences about why. Until then it''s all guess work.

And before you ask: "No, I don''t want your table or CSV file" - this one is up to you!