Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MS SQL syntax : How to use bcp to output a fixed column data file ?

Posted on 2009-03-30
2
Medium Priority
?
275 Views
Last Modified: 2012-05-06
Hi,

I'm now trying to use bcp command to output a MS SQL table into a "fixed column" format text file.  Could anyone help me on this and give me an example for quick resolution?  Thanks a lot.

Cheers
Stanley
0
Comment
Question by:StanleyLMW
  • 2
2 Comments
 
LVL 8

Expert Comment

by:vinurajr
ID: 24026288
bcp Database.dbo.Table out c: Filename.txt -n -S Server -U Username -P Password -eC: error.txt
0
 
LVL 8

Accepted Solution

by:
vinurajr earned 2000 total points
ID: 24026293
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question