"For example John Smith" <so*****@microsoft.com> wrote in message news:<3f***********************@news.easynet.co.uk >...
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?
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('Hello', 16, 1) with nowait
waitfor delay '000:00:05'
print 'Finished'
go
Simon