I am attemtping to use bcp to load a file from the command line. I
originally used the Bulk Insert statement -- using the same parameters -
- which loaded the file successfully (except for some bugs, described
below). When I use the command line, I get
bcp tgitest.dbo.DWLStaging in
ItemMasterDetail.txt /SDelta /Usa /Pourpassword /c /F2
Starting copy...
SQLState = 37000, NativeError = 170
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:
Incorrect syntax near 'varchar'.
What's wrong?
The reason I want to know is I want to capture errors. The bcp command
line has the /e flag to capture errors to a file. The Bulk Insert
documentation does not have a simillar option. If I put "errorfile
= 'whatever'", SQL server does not parse it as an error, but I don't
get a file either (I can put garbage in the filename without it
complaining). Does anyone know if it can be used?
When I used Bulk Insert, if there is a truncation error on one row,
that row AND the row after don't get loaded. Is there a fix for that?
We have SP2 already.
If a Batch_size limit is set, the insert mis-counts the number of rows
by 1 for each batch. Like, if the batch size is 1000, it will insert
1000 rows, but read 1001. It will display "1001 rows inserted", and
the 1001st row will be missing from the load. So if there are 10,000
total rows, it will drop 9 of them. Any fix?
--
Yabba Dabba Doo
--
Yabba Dabba Doo
Sent via Deja.com http://www.deja.com/
Before you buy.