Solved

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

Posted on 2009-03-30
2
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 total points
ID: 24026293
0

Featured Post

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
MS SQL Conditional WHERE clause 3 49
SQL Rewrite without the NULLIF 4 33
Finding Where Clause Value in SQL Views and SP 21 62
Not listening to where 1 43
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​

710 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