Advertisement

04.30.2008 at 12:41AM PDT, ID: 23364613
[x]
Attachment Details

Output table data into a CSV file using BCP

Asked by FMabey in MS SQL Server, Microsoft Visual Basic.Net

Tags: SQL, SQL Server 2000

Hi all,

I have the following BCP statement that I cannot get to work:

bcp partman.dbo.export_part out c:\test.csv /U /P /sqlsvr1 /c /t

I am hoping to export the data from table export_part into CSV file test.csv.

However, I get the error:

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '.'.

I have also tried:

bcp partman.dbo.export_part out "c:\test.csv" -c -t -S SQLSVR1 -T -e "C:\bcperror.txt"

But I get the same error.

Can anyone point me in the right direction... I've not used BCP before and am obviously going wrong somewhere!

CheersStart Free Trial
 
Loading Advertisement...
 
[+][-]04.30.2008 at 01:13AM PDT, ID: 21468865

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 01:29AM PDT, ID: 21468930

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 01:32AM PDT, ID: 21468940

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 02:09AM PDT, ID: 21469074

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 02:19AM PDT, ID: 21469104

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 02:20AM PDT, ID: 21469112

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 02:32AM PDT, ID: 21469147

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 02:36AM PDT, ID: 21469158

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 03:41AM PDT, ID: 21469404

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, Microsoft Visual Basic.Net
Tags: SQL, SQL Server 2000
Sign Up Now!
Solution Provided By: Dhaest
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628