What the best way to work around this? I have the same SELECT statement but there are different criteria depending on the IF check. Well, if you happen to be using Sql Server you can do that sort of ...
A common SQL habit is to use SELECT * on a query, because it’s tedious to list all the columns you need. Plus, sometimes those columns may change over time, so why not just do things the easy way? But ...
SQL Server is one of the best products to come out of Microsoft, but not every professional knows how to use it effectively. For example, some might find it difficult to create a stored procedure but ...
Peter revisits an earlier tip on how to use stored procedures to speed up your code. This version makes your stored procedures simpler … though you may have to write a little more code to make the ...
Everyone wants faster database queries, and both SQL developers and DBAs can turn to many time-tested methods to achieve that goal. Unfortunately, no single method is foolproof or ironclad. But even ...
Tony Patton discusses the merits of stored procedures versus placing SQL directly in the code. Find out which one is best for your particular situation. I once was pulled into a discussion about the ...
I wrote a query (with lots of help, see my painfully plentiful other threads) using a correlated subquery and it takes 5.78 seconds PER RECORD to return results. The SAME query, only I select the ...