column display in osql

  • Hi,

    I've started using osql.In QA, I can resize the column names of my rows to suit the screen display.However, in osql, if I am returning lots of long column names in my rows, then the display is all messed up.Is there a way around this (other than having to go thru all my sprocs and use abbreviated aliases for each and every column name?)

    cheers,

    yogi (hope this is the right thread :-))

  • You can use isqlw instead of osql.

    isqlw is the way to execute QA by the command line. If you don't specify any parameters then is like opening QA, but if you specify the needed parameters, then you can execute a query and it will be displayed just like QA.

    Run isqlw -? from the command line to know the parameters.

  • cheers for the reply.

    I tried to login using:

    isql -E

    However, I get a login problem:

    "DB-Library:Unable to connect:Sql server is unavaliable or does not exis.

    Unable to connect:Sql server is unavaliable or network access is denied:

    Net library error 53:"

    YET, I can log in to osl using:

    "osql -E"

    ya es como para volverse loco 😉

    I am sure it's a permissions issue.

    Can anyone advise?

    Many thanks,

    yogi.

  • You might need to specify the server as well.

    osql -S servername -E

    isqlW.exe (QueryAnalyser) is a good option too -- you can create a Configuration file from within a normal interactive QueryAnalyser session with Tools - Options - Save. This includes your settings on column formatting (space padded etc). Then use the config file with:

    isqlw -S sv -E -C configfile -i queryfile -o outputfile

  • Hi,

    Yes it is isql that i am trying to connect to.I'll give the config file a bash.

    cheers,

    yogi.

  • I got around a similar problem by using "-w1000" on the osql command and by changing the properties of the DOS window:

    Right click on the "C:\" graphic in the DOS window's title bar, then click on Properties

    Select the Layout tab

    Screen Buffer Size:

    Width: 1000

    Height: 2000

    See if this helps.

    Jon

  • too right!

    cheers Jon...

    yogiberr

Viewing 7 posts - 1 through 6 (of 6 total)

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