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).
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
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
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.