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

Posted on 2009-03-30
Last Modified: 2012-05-06

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.

Question by:StanleyLMW
  • 2

Expert Comment

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

Accepted Solution

vinurajr earned 500 total points
ID: 24026293

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
oracle query help 18 99
Help with SQL Query 23 53
Very interesting Access query problem. 13 70
SQL Union 20 44
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…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

910 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

21 Experts available now in Live!

Get 1:1 Help Now