isql output question

  • I am running a script using isql and sending the output to a txt file via -o; The put put contains alot of >>>>>; How do I suppress these from printing.

    thanks in advance

  • Add the "-n" parameter to your command line to suppress both the prompts and the line numbering.

    Recommend you use OSQL instead.

    --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)

  • Hi,

    Can anyone throw some light on OSQL , how to use it and the benefits rather comparison with ISQL, I am so used to ISQL rather I am not aware of OSQL to precise, any info or links would be appreciated.

    Thanks

    Prasad Bhogadi
    www.inforaise.com

  • The Following is from BOL, under ISQL, "

    isql Utility

    The isql utility allows you to enter Transact-SQL statements, system procedures, and script files; and uses DB-Library to communicate with Microsoft® SQL Server™ 2000.

    Syntax

    isql

        [-?] |

        [-L] |

        [

            {

                {-U login_id [-P password]}

                | –E

            }

            [-S server_name] [-H wksta_name] [-d db_name]

            [-l time_out] [-t time_out] [-h headers]

            [-s col_separator] [-w column_width] [-a packet_size]

            [-e] [-x max_text_size]

            [-c cmd_end] [-q "query"] [-Q "query"]

            [-n] [-m error_level] [-r {0 | 1}]

            [-i input_file] [-o output_file] [-p]

            [-b] [-O]

        ]

    Remarks

    All DB-Library applications, such as isql, work as SQL Server 6.5–level clients when connected to SQL Server 2000. They do not support some SQL Server 2000 features. The osql utility is based on ODBC and does support all SQL Server 2000 features. Use osql to run scripts that isql cannot run. For more information about the restrictions on SQL Server 6.5–level clients, see Connecting Early Version Clients to SQL Server 2000 in SQL Server Books Online.

    "

    With Concern to OSQL, "

    osql Utility

    The osql utility allows you to enter Transact-SQL statements, system procedures, and script files. This utility uses ODBC to communicate with the server.

    Syntax

    osql

        [-?] |

        [-L] |

        [

            {

                {-U login_id [-P password]}

                | –E

            }

            [-S server_name[\instance_name]] [-H wksta_name] [-d db_name]

            [-l time_out] [-t time_out] [-h headers]

            [-s col_separator] [-w column_width] [-a packet_size]

            [-e] [-I] [-D data_source_name]

            [-c cmd_end] [-q "query"] [-Q "query"]

            [-n] [-m error_level] [-r {0 | 1}]

            [-i input_file] [-o output_file] [-p]

            [-b] [-u] [-R] [-O]

        ]

    "

    Gary

  • Thanks Jeff

    the -n option solved the issue!

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

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