I want to dump a tale into a text file I am using following command –
bcp tablename out myTable.dat -T -C
But got error it says incorrect symbol near bcp.
I am not sure why I am getting this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From @Code Monkey’s Link : http://www.simple-talk.com/sql/database-administration/creating-csv-files-using-bcp-and-stored-procedures/
try this
where dbname is the name of your database, and replace dbo with the name of the schema if not dbo