SQL Bulk Insert

I need a quick load from a flat file containing 1 field, 4 characters wide.  Rows are delimited with a carriage return.

The db table contains only 1 column, char(4).

A sample of the data in the file looks like this:
(lð0
((Fë
((Gt
((G˜
((GÒ
(((A
(((C
((¬S
((¬a
((¬œ
((†
((¬ò
(Wfi
((­x
((­˜
(WJz
((®+
((®9
((«€
((Ǽ
((«Ø
((¬=
((ªÐ
((ªî
(WJŒ
(*qW
(*qx
(*qá
(*qï
(‰/]
(*r†
(*r–
(*rÄ
(*s+

BULK INSERT db.table from 'C:\file.txt'
with {
  ROWTERMINATOR='\n'
)
give this error:
Bulk load data conversion error (truncation) for row 1, column 1

Do I need more parameters?

Thanks in advance!
kkbenjAsked:
Who is Participating?
 
JestersGrindConnect With a Mentor Commented:
Your syntax is correct, but you have a curly brace after WITH instead of a open parenthesis.  Try this.

BULK INSERT Test
FROM 'C:\file.txt'
WITH (ROWTERMINATOR='\n')

Greg

0
 
kkbenjAuthor Commented:
I've requested that this question be deleted for the following reason:

question aborted
0
 
JestersGrindCommented:
Although the answer was fairly obvious, the question was answered.

Greg

0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
kkbenjAuthor Commented:
That was simply a typo on my end in entering the question.  The issue turned out to be converting the file to ANSI worked fine.
But I'll award the points for your clarification.  Thanks!
0
 
JestersGrindCommented:
Sorry for the confusion.  If you would have mentioned that in your reason for closing the question, I wouldn't have objected to it.  Again, I apologize for the mix up.

Greg

0
 
kkbenjAuthor Commented:
I always appreciate the help!
0
All Courses

From novice to tech pro — start learning today.