Performance issue querying Linked Servers in SQL Server

When querying a linked server in SQL server there are basically two different ways to do it. Four Part Naming There is the four part naming method which calls the object directly while tacking on the linked server name to the table you are querying.

And this method is nice and simple, but it works by passing the full … Read More

Mike GriffithPerformance issue querying Linked Servers in SQL Server

Excluding certain fields in a SQL AVG field with a Case statement.

If you need to get an average of a field during a query, but exclude a few groups you can use a case statement inside of an AVG call to eliminate those groups from the average. All that you need to do is return a null for the value in the case statement. For example the following code will get … Read More

Mike GriffithExcluding certain fields in a SQL AVG field with a Case statement.