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 ...
Tim Chapman discusses your iteration choices in SQL Server 2008 and explains why determining which option performs better depends on the situation. In a previous TechRepublic column about SQL Server ...
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 ...