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 ...
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, ...