Query Analyser 2000 vs 7.0

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • For example John Smith

    Query Analyser 2000 vs 7.0

    ISTR QA running in 7.0 would return print statements and messages as the
    query ran (well, after a "GO" statement anyway). In 2000 it doesn't return
    any messages until after the entire query batch has completed. In wanting to
    keep an eye on progress on long batches, how can I make 2000 work more like
    7.0 in this respect?


  • Simon Hayes

    #2
    Re: Query Analyser 2000 vs 7.0

    "For example John Smith" <someone@micros oft.com> wrote in message news:<3f3cb2a5$ 0$18262$afc38c8 7@news.easynet. co.uk>...[color=blue]
    > ISTR QA running in 7.0 would return print statements and messages as the
    > query ran (well, after a "GO" statement anyway). In 2000 it doesn't return
    > any messages until after the entire query batch has completed. In wanting to
    > keep an eye on progress on long batches, how can I make 2000 work more like
    > 7.0 in this respect?[/color]

    The PRINT output is always returned after the batch completes. If you
    need to return messages during the batch execution, you could look at
    RAISERROR WITH NOWAIT, depending on exactly what you need to achieve:

    /* No message until the batch ends */
    print 'Hello'
    waitfor delay '000:00:05'
    print 'Finished'
    go

    /* First message returned immediately */
    raiserror('Hell o', 16, 1) with nowait
    waitfor delay '000:00:05'
    print 'Finished'
    go

    Simon

    Comment

    • Mike K

      #3
      Re: Query Analyser 2000 vs 7.0

      sql@hayes.ch (Simon Hayes) wrote in message news:<60cd0137. 0308150446.7c63 24de@posting.go ogle.com>...[color=blue]
      > "For example John Smith" <someone@micros oft.com> wrote in message news:<3f3cb2a5$ 0$18262$afc38c8 7@news.easynet. co.uk>...[color=green]
      > > ISTR QA running in 7.0 would return print statements and messages as the
      > > query ran (well, after a "GO" statement anyway). In 2000 it doesn't return
      > > any messages until after the entire query batch has completed. In wanting to
      > > keep an eye on progress on long batches, how can I make 2000 work more like
      > > 7.0 in this respect?[/color]
      >
      > The PRINT output is always returned after the batch completes. If you
      > need to return messages during the batch execution, you could look at
      > RAISERROR WITH NOWAIT, depending on exactly what you need to achieve:
      >
      > /* No message until the batch ends */
      > print 'Hello'
      > waitfor delay '000:00:05'
      > print 'Finished'
      > go
      >
      > /* First message returned immediately */
      > raiserror('Hell o', 16, 1) with nowait
      > waitfor delay '000:00:05'
      > print 'Finished'
      > go
      >
      > Simon[/color]

      Try viewing the ouput in Text mode. (Instead of the Grid)

      Comment

      • For example John Smith

        #4
        Re: Query Analyser 2000 vs 7.0

        > Try viewing the ouput in Text mode. (Instead of the Grid)

        That worked a treat, thanks.


        Comment

        Working...