Query Analyzer - not printing output

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcus

    Query Analyzer - not printing output

    Is there something that can be set in SQL to not print output to the
    screen? Something like SET NOCOUNT ON, only in this case, I don't
    want it to print any output except what my script specifies in PRINT
    statements. Any ideas? Thank you.
  • Simon Hayes

    #2
    Re: Query Analyzer - not printing output


    "Marcus" <mjb5123@yahoo. com> wrote in message
    news:7d2451d5.0 311201022.35dc4 f3f@posting.goo gle.com...[color=blue]
    > Is there something that can be set in SQL to not print output to the
    > screen? Something like SET NOCOUNT ON, only in this case, I don't
    > want it to print any output except what my script specifies in PRINT
    > statements. Any ideas? Thank you.[/color]

    Not all output and messages can be avoided - can you give an example of the
    output you don't want to see? You might also want to look at using OSQL.EXE
    with an output file.

    Simon


    Comment

    • Raghuraman

      #3
      Re: Query Analyzer - not printing output

      Hi,

      set no count on

      will only suppress the total recrds read by the query .But i don't
      think will eliminates the visibility of the query result.

      Comment

      • Marcus

        #4
        Re: Query Analyzer - not printing output

        Thanks for your feedback.

        I wrote a batch file to be run from query analyzer for use by would-be
        developers (much like myself). In order to get the final output to
        the users, I issue quite a few select statements. When they see all
        the output from various select statements, they get confused.

        I'm using dynamic sql to execute the select statements. Actually, if I
        knew how to issue "exec('sele ct count(*), etc. " into variables using
        dynamic sql, I wouldn't have the problem of trying to suppress output.
        But I can't seem to get that working.

        Marcus


        "Simon Hayes" <sql@hayes.ch > wrote in message news:<3fbd17b3$ 4_2@news.bluewi n.ch>...[color=blue]
        > "Marcus" <mjb5123@yahoo. com> wrote in message
        > news:7d2451d5.0 311201022.35dc4 f3f@posting.goo gle.com...[color=green]
        > > Is there something that can be set in SQL to not print output to the
        > > screen? Something like SET NOCOUNT ON, only in this case, I don't
        > > want it to print any output except what my script specifies in PRINT
        > > statements. Any ideas? Thank you.[/color]
        >
        > Not all output and messages can be avoided - can you give an example of the
        > output you don't want to see? You might also want to look at using OSQL.EXE
        > with an output file.
        >
        > Simon[/color]

        Comment

        Working...