June 1, 2010 at 12:13 am
Hi friends
I m trying to import data from txt file but i m getting error
C:\Program Files\Log Parser 2.2>bcp vwap.dbo.msgtrackinglogs in C:\20071106.txt
-c -t "\t" -SIT-VEN22\DBA -T -F 2
Starting copy...
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
SQLState = 37000, NativeError = 102
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'
.
BCP copy in failed
AttachedTxt file is
can anybody help me???????????
Sanket Ahir
Don't run behind the success, Try to be eligible & success will run behind u......
June 1, 2010 at 3:37 am
Hi Sanket,
May I know which version MDAC are you using on this server? If you are not using MDAC older version, please try to upgrade it to MDAC 2.7 or higher.
- SAMJI
If you marry one they will fight with you, If you marry 2 they will fight for you 🙂
June 1, 2010 at 4:29 am
its 2.8
Sanket Ahir
Don't run behind the success, Try to be eligible & success will run behind u......
June 1, 2010 at 4:54 am
In you BCP command line you specify line 2 as the first line but if you look in the sample .txt file the column headers appear on row 2 as there is a blank row.
These column headers contain the '-' character which is may be the cause of your error.
Try changing the BCP command line to start at row 3 (-F3) or manually remove the initial blank line from the .txt file.
June 1, 2010 at 9:38 pm
still getting the same error
Sanket Ahir
Don't run behind the success, Try to be eligible & success will run behind u......
June 2, 2010 at 3:54 pm
Try putting the server name in double quotes like -S"abc\xyz" I have had similar problems and the \ in the server name seems to throw bcp
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply