bcp out table to text file

Posted on 2007-09-30
Last Modified: 2010-08-05
 How do I export table in sybase database to text file.
I am using:
bcp Database1..RevBackupNew out tbl1.dat -S DEVLOP_T -U eee -P bbb

the problem is that one row in database I got it in more than one row in the export file

Question by:madmare
    LVL 19

    Accepted Solution

    What you are seeing is BCP output in the "native" format which writes fields in a binary format.

    Add "-c" to your BCP command line to get "character" mode.  The default is "-n" for "native" mode which is what you are seeing.

    LVL 10

    Assisted Solution

    ... and if you are getting the output on multiple lines when using character mode, it means that your data contains some newline characters, and you will then want to look at using something other than the default row terminator character (the -r parameter), some string that is very unlikely to be in your data such as "@@#$#@"

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    754 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

    16 Experts available now in Live!

    Get 1:1 Help Now