bulk insert error...

bulk insert error...

Post by a » Thu, 19 Sep 2002 05:10:43



This error is probably due to the size of field and it cant insert into the
field.
Please check the length and data it is inserting into the columns and you
should be fine.
Anup

Quote:> Hello:

> I am doing this:

> BULK INSERT tcc..regtxt FROM 'C:\TCC\Cons.log'
> WITH (FORMATFILE = 'c:\regtxt.fmt')

> But i get this error:

> Server: Msg 8152, Level 16, State 9, Line 1
> String or binary data would be truncated.
> The statement has been terminated.

> This is a normal line on my *.log:
> 0;09/04/2002;172.21;;216.199;1353/originate;0;202;85;234124

> But, for your interest, I have in the end of the file this:
> 349175;09/05/2002;208.136;;10009;origi

> not more.

> you can see in the last line, that the data no was
> terminate correctly, so i get that error.

> When the bulk insert finish the process nothing was
> inserted.

> so, what i have to do in order to apply the bulk insert ???

> PSD: I cant modified the data file.

> Any help is greatly appreciated,

> Thanks.

 
 
 

bulk insert error...

Post by lubie » Thu, 19 Sep 2002 04:42:07


Hello:

I am doing this:

BULK INSERT tcc..regtxt FROM 'C:\TCC\Cons.log'
WITH (FORMATFILE = 'c:\regtxt.fmt')

But i get this error:

Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.

This is a normal line on my *.log:
0;09/04/2002;172.21;;216.199;1353/originate;0;202;85;234124

But, for your interest, I have in the end of the file this:
349175;09/05/2002;208.136;;10009;origi

not more.

you can see in the last line, that the data no was
terminate correctly, so i get that error.

When the bulk insert finish the process nothing was
inserted.

so, what i have to do in order to apply the bulk insert ???

PSD: I cant modified the data file.

Any help is greatly appreciated,

Thanks.

 
 
 

bulk insert error...

Post by William Chen [M » Fri, 20 Sep 2002 15:41:42


I hope the following article helps you:

Q255765 PRB: How to Troubleshoot Differences Between An App. and ISQL
http://support.microsoft.com/support/kb/articles/q255/7/65.asp

--
This posting is provided "AS IS" with no warranties, and confers no rights.

Thanks,

William Chen

 
 
 

1. Bulk Insert Error

We are migration from SQL Server 7 to 2000.  While the Bulk Insert
works in Ver. 7 it does not work in 2000.  There error I am getting
is:

Bulk Insert data conversion error (type mismatch) in tow X, column
7(SubId).

Here is the Format File:

7.0
7
1       SQLCHAR       0       3       ""                        1    
TARNO
2       SQLCHAR       0       3       ""                        2    
CXRCD
3       SQLCHAR       0       8       ""                        3    
FARECLS
4       SQLCHAR       0       4       ""                        4    
RULENO
5       SQLCHAR       0       3       ""                        5    
FARETYPE
6       SQLCHAR       0       1       ""                        6    
CATTYPE
7       SQLCHAR       0       10      "\r\n"                    7    
SUBID

and a sample of the data.

013UA TE14NQ  4027XPNE1054      
011AA NX14E2QN4035XPNE1054      
011AA N14E2QN 4035XPNE1054      
011CO BEY14ZN 4087XPNE1054      
011CO BEZ14ZN 4087XPNE1054      
011CO HEY14ZN 4087XPNE1054      
011CO HEZ14ZN 4087XPNE1054      
011CO KEY14ZN 4087XPNE1054    

Ive run up against a brick wall on this one...

any help will be greatly apreciated.

Blake

2. Oracle and Dynamic Views

3. Unknown version of format file: BULK INSERT ERROR

4. Connection String Problem

5. Intercepting Bulk Insert errors

6. SuperBase 95 (second posting)

7. Bulk Insert Error

8.  

9. Bulk Insert error checking

10. BULK INSERT ERROR

11. Bulk Insert Error