I want to import a single column text file into one of my sql tables. The file is a list of abusive words.
I wrote the following TSQL to do this
BULK INSERT SwearWords FROM 'c:\swears.txt' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n' )
However, these are errors with an unused end of file. Importing an im table is just an identifier field, followed by an nvarchar field into which I want to insert text. It works fine if I add "1" to the text file at the beginning of the eveyr line, I assume that this is because SQL is looking for 2 fields. Is there any way around this?
thanks
Gavin source share