Formatting to a output file using OSQL

  • Is there a way in SQL for me a define formating of a output file. when I pump output to my file it wraps around to the next line. I'm currently using OSQL commands in a batch file. My Outout looks like this:

    XXXXXX XXX  

     XXXX XXXX-XXXXXX-S

    And I would like for it to look like this:

    XXXXXX XXX  XXXX XXXX-XXXXXX-S

    Thanks for your help, am kinda new to this.

     

  • Not sure exactly what syntax are you using but you should be able to specify a format file and use a query or a view to handle the Field sizing / Positioning

     


    * Noel

  • If you use the '-w' switch on the OSQL command line, you can make the output column wide enough to avoid the wraparound.

     


    And then again, I might be wrong ...
    David Webb

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

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