I am trying to insert data from this link into my SQL server
https://www.ian.com/affiliatecenter/include/V2/CityCoordinatesList.zip
I created a table
CREATE TABLE [dbo].[tblCityCoordinatesList](
[RegionID] [int] NOT NULL,
[RegionName] [nvarchar](255) NULL,
[Coordinates] [nvarchar](4000) NULL
) ON [PRIMARY]
And I run the following script to do bulk insertion
BULK INSERT tblCityCoordinatesList
FROM 'C:\data\CityCoordinatesList.txt'
WITH
(
FIRSTROW = 2,
MAXERRORS = 0,
FIELDTERMINATOR = '|',
ROWTERMINATOR = '\n'
)
But the main insert fails with the following error
Cannot obtain the required interface ("IID_IColumnsInfo") from OLE DB provider "BULK" for linked server "(null)".
When I google, I found several articles that said the problem might be with RowTerminator, but I tried everything like / n / r, / n, etc., but nothing works.
Can someone help me insert this data into my database?
source
share