Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 BULK INSERT fails due to difference in DB conf.

Author  Topic 

thomasisomaki
Starting Member

1 Post

Posted - 2012-01-10 : 07:26:18
Hello everyone,

I have a problem with BULK INSERTs when I run the following SQL script

bulk insert table_X from 'file_Y' with(fieldterminator='\t',rowterminator='\n',codepage='ACP')

No format files are provided but I rely on that a plain csv file(with tab as separator) will suffice. On server servA this works fine but on server servB I get problems with the last column(see message below). I run the same file file_Y against servA and servB and also the table structure is identical in them. So, the error is as follows:


load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 8 (columnZ).

Any ideas what could be wrong? At this stage of our implementation there is no idea of changing to SSIS, batch JDBC inserts or whatever but the BULK INSERT should be fixed in a way or another.

Best Regards,
Thomas Isomäki

Sachin.Nand

2937 Posts

Posted - 2012-01-10 : 08:30:57
Are you sure the structure of the tables are same ? I would check column no 8 datatype and length.

After Monday and Tuesday even the calendar says W T F ....
Go to Top of Page
   

- Advertisement -