Am using this BULK INSERT command to insert a csv file in SQL Server 2012 Express.
BULK INSERT dbo.TS_FX
FROM 'c:\fxRates.csv'
WITH
(
FIELDTERMINATOR =',',
ROWTERMINATOR =',\n'
);
The First Row on the fxRatesCSV file looks like this:
101,20130430,20130531,1.5307
The error I get is:
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 4 (FX_RATE).
My table (dbo.TS_FX
) has 4 columns in it defined as follows
CURRENCY_ID (Numeric(3,0), null)
BEGIN_DATE (date, null)
END_DATE (date, null)
FX_RATE (float, null)
Clearly the error is the way I have defined the FX_RATE
column, I have tried various other types (Decimal, Numeric
) but I still get the same error
Any help is much appreciated.
Thanks