Jcmoney1010
Jcmoney1010

Reputation: 922

Bulk Insert Resulting in 0 Rows Affected

so I'm having some issues with the bulk insert query and I was hoping someone on here could help me figure out the issue. Below is my Bulk insert:

BULK INSERT [DB_Test].[dbo].[1_Import_ATT_tbl_GPSD]
FROM '\\IP Address\Folder\CSV_FIle.csv'
WITH
(
FIRSTROW = 2,
FIELDTERMINATOR = ',',  --CSV field delimiter
ROWTERMINATOR = '/n',  
TABLOCK
)

I've checked the row terminators in the source file and they end with LF, but I've tried every row terminator I can think of, and they all result in 0 rows affected. The source file is a simple 13 column CSV, and I can't seem to get anything imported. Is there something I'm missing? I know it has nothing to do with permissions, as I've already checked. Any ideas?

Upvotes: 1

Views: 2557

Answers (1)

p w
p w

Reputation: 61

The rowterminator is wrong.

Should be:

ROWTERMINATOR = '\n'

Upvotes: 2

Related Questions