SET NOCOUNT ON

Why am I blogging about “SET NOCOUNT ON” in my last query from yesterday because it was quite finished!

I use “SQL Query Analyzer” to create most queries however I almost never view then into my SMS Web reports, since they should look exactly the same within SMS web reports.

This is what I’m expecting to show in Web reports:

Query Analyzer

This is true for all web reports where it only contains just one query however if you add two or more queries to make a complex query / results, within SMS web report it will show something different.

With Count

Now if you add the “SET NOCOUNT ON” to the query at the beginning. This is what it will show within SMS web reports.

No Count

Notice that is it cleaner.

Leave a Reply

Your email address will not be published. Required fields are marked *