Saturday, February 25, 2012

bulk insert

I'm trying run a bulk insert statement to insert data into an existing table:

Here is an example of the text file data:

"BEGIN_APP_YR","2001"
"BISP_EXPD_THRU","200512"
"BISP_ITER","PRELIM"
"BISP_LAST_PUB_DT","02/14/200612:41PM"
"BISP_YR","2007"
"BISP_YRS","3"
"END_APP_YR","2006"

This is the bulk insert statement I'm using:

BULK INSERT AFR.dbo.[BISM_CONFIG]
FROM 'c:\sql\default\bism_config.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)

I'm getting a syntax error near ')'

Any help is appreciated.
Thanks,
-D-hi, you run the bulk insert in the Query Analyzer?
what is the complete error?
the syntax of the statement is correct.
test change the ',' for ';' or '|' (sure you need change the txt)

abel

No comments:

Post a Comment