BCP output formatting issue

  • I have a procedure which returns create table script for a particular table. I want to copy this create table script to a text file. But the problem is with formatting while BCP out the resultset to a output file. The alignment is changed because values are shifted after 256 characters in a line and moved the next line.

    Here is the BCP command I am using....

    osql -U monitor -P monitor -S hbdwdb1\hbdwuat -H hbdwdb1 -d revluata -i e:\Archive\qry.sql -o e:\Archive\LogOutput.txt -w 2000 -a 65000 -u

    I use outputting the other way but the result is same in one line it's putting only 255 character in one line here is the other query.....

    osql -U monitor -P monitor -S hbdwdb1\hbdwuat -H hbdwdb1 -d revluata -i e:\Archive\qry.sql -w 2000 -u >e:\archive\ppp.sql

    Any body having any idea how can it be done????

    Prakash

    Prakash Heda
    Lead DBA Team - www.sqlfeatures.com
    Video sessions on Performance Tuning and SQL 2012 HA

  • This was removed by the editor as SPAM

  • Can u post details of the procedure. Is there a special reason why you are using a proc to generate code instead of EM?

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply