Solved

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

Posted on 2009-03-30
2
266 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
Comment Utility
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 500 total points
Comment Utility
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In database programming, custom sort order seems to be necessary quite often, at least in my experience and time here at EE. Within the realm of custom sorting is the sorting of numbers and text independently (i.e., treating the numbers as number…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now