ISQL

  • How can I specify in isql that I want the output to be tab delimited?

    I have this DTS package, that runs an isql, saves the output to a file, and then manipulates the file and stores it in excel. However, the first column has trailing spaces. I want to get rid of the trailing spaces.

    Any ideas?

    The query in isql is being run in SQL 6.5. The DTS is in SQL Server 2000.

  • I'll bite until someone who knows 6.5 better comes along.

    You could use a DTS text file connection in place of isql?

  • I agree with Allen....if you are looking for a command line solution...create a DTS package and run it using dtsrun.

    HTH


    Mathew J Kulangara
    sqladventures.blogspot.com

  • Try something like this (defaults to tab delimited for Excel)...

    BCP "SELECT au_fname, au_lname FROM pubs..authors ORDER BY au_lname" QUERYOUT Authors.xls -c -S"yourservername\instancename" -Uyourusername -Pyourpassword

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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