Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello,
my bcp gives me back a error message
sqlstatement:
BCP Edu.dbo.lam out c:\lam.txt -c-S(SHABAN-PC\SQLEXPRESS2005) Usa Pasdf

the error message is "Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '.'."
hope to get help
thanks
Posted
Comments
ZurdoDev 2-Nov-12 15:23pm    
It's a syntax error so if we can't see your syntax we can't help.
OriginalGriff 2-Nov-12 15:25pm    
How are you executing it?
sisey shaban 2-Nov-12 17:59pm    
how was i suppose to execute it..i wrote those codes in a management studio of sql2005 and i clicked on the execute button, please help if there are other ways of executing..
thank u

1 solution

You can't use bcp commands in MS SQL Managment Studio! This is a command prompt application for MS SQL Server.

Note:
The bcp 9.0 client is installed when you install Microsoft SQL Server tools on your system. If both SQL Server 2005 and SQL Server 2000 tools are installed, depending on the value of the PATH environment variable, you might be using the earlier bcp client instead of the bcp 9.0 client. This environment variable defines the set of directories used by Windows to search for executable files. To discover which version you are using, run the bcp /v command at the Windows Command Prompt. For information about how to set the command path in the PATH environment variable, see Windows Help.
(...)
For information about where to find or how to run the bcp utility and about the command prompt utilities syntax conventions, see Command Prompt Utilities[^].


More about bcp utility here: http://msdn.microsoft.com/en-us/library/ms162802%28v=sql.90%29.aspx[^]

Similar question: http://www.dotnetfunda.com/interview/exam2399-can-we-execute-bcp-command-directly-in-the-sql-server-managemen.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900