Quantcast
Channel: BCP error
Viewing all articles
Browse latest Browse all 5

BCP error

$
0
0

Why is that the following code doesn't work ..(error is Unknown argument '.csv' on command line.)

exec master.dbo.xp_cmdshell 'bcp Test2.dbo.TestTableImport in C:\TestTable .csv -c -T -t '

But the following works..Any thoughts?

BULK
INSERT TestTableImport
FROM 'c:\TestTable.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
GO


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images