Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Bulk insert and format file error : "Cannot bulk load. Unknown version of format file"

$
0
0

Hello

I have my table and bulk insert as:

DROP TABLE states
CREATE TABLE states(

	zip			int				NOT NULL,
	city		varchar(50)		NOT NULL,
	state		varchar(50)		NOT NULL,
	latitude	decimal			NOT NULL,
	longitude	decimal			NOT NULL,
	timezone	int				NOT NULL
)
GO

BULK INSERT states
FROM
	'C:\zipcode.csv'
WITH(

FORMATFILE = 'C:\FormatFile.fmt'
)
GO

My format file is as:

12.0
6
1SQLINT06","1zip""
2SQLVARCHAR050","2citySQL_Latin1_General_CP1_CI_AS
3SQLVARCHAR050","3stateSQL_Latin1_General_CP1_CI_AS
4SQLDECIMAL010","4latitude""
5SQLDECIMAL010","5longitude""
6SQLINT02","6timezone""

I don't understand why I am still getting the error:

"Cannot bulk load. Unknown version of format file"

I am using SSMS 2014 and microsoft tells me the version is 12.0

what is going on?

Thanks


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>