isql command problem

  • hi ,

    I am using an isql command to get the output in a file .

    I am using a "-h-1 "  option to remove the headers.

    however, it leaves a blank line in place of the header.

    Is there any way by which i can remove the blank line from the file..using isql

    command or any other command.

    Thanks,

    Raxit

     

  • Raxit,

    I inherited some perl modules that use OSQL to query the database. It uses the "-h-1 -n" switches and doesn't seem to have any problems with blank lines. The "-n" switch removes numbering and the prompt symbol from input lines.

    Inside the sql code it also does this... "set nocount on"  which doesn't display the rowcount. Try these and see what happens.

    I would also suggest you migrate to osql. I read in a few places this is the recommended way to go.

     

    Tom

  • Not knowing what the output looks like but...

    isql has a default output width of 80. If the output line is longer isql will split it into several lines.

    So,

    isql -Q "select replicate(' ',78)+'TEST'" -Sservername -E -h-1 -n

    would put TEST on second line effectively giving you a blank line

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

  • Another parameter that is set on the isql command is -w 1000 . Since we don't seem to have the blank line problem maybe this one helps.

     

    Tom G

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

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