Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Generating a Format File in Sybase ASE BCP

Posted on 2013-10-22
1
Medium Priority
?
1,497 Views
Last Modified: 2013-10-23
I cannot figure out for the life of my how to generate a format file in a batch file in sybase. I use the following to create my bcp of data file:

bcp mytester.dbo.XTABLE out XTABLE.bcp -U sa -P mypass -T -n

I would think I could do like in sql server:

bcp mytester.dbo.XTABLE format XTABLE.bcp -U sa -P mypass -T -n
or
bcp mytester.dbo.XTABLE out XTABLE.bcp -U sa -P mypass -T -n  -f XTABLE.fmt

but it doesnt seem to work. it seems the only way to do it is in the mode when it prompts me for all details, which is unacceptable for waht I want to do (many tables in a BAT file).

Anyone know how to pull this off?
0
Comment
Question by:Jay Redd
1 Comment
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 2000 total points
ID: 39593423
That is how it works, sadly. If you want bcp to generate a format file for you, it does so interactively.

However the format file has a well documented structure and there's nothing stopping you from writing your own, programatically, in a batch file or script.

See the Utility Guide for ASE of your version, available for free from the Sybase site.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
I came across an unsolved Outlook issue and here is my solution.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Loops Section Overview
Suggested Courses
Course of the Month20 days, 15 hours left to enroll

810 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