Answer by Usman Butt
Personally, I do not like DYNAMIC QUERIES as there are so many factors get involved. But In your case, the problem is not with the **dynamic query** but it is more pertaining to the nature of the...
View ArticleAnswer by WilliamD
@Usman Butt - I would be careful with a blanket statement like "do not use window functions in views". I have very successfully implemented window functions in views in the past. As you said yourself,...
View ArticleAnswer by dmeenan
Once again I've been gobsmacked by the sheer power of an answer from the "land of the long white cloud" (NZ); SQL Kiwi nailed it. This explanation was both accurate (verifed) and devoid of extraneous...
View ArticleAnswer by SQL Kiwi
*[Deleted my previous answer, because I have changed my mind about some of the details following deeper investigation (blog post to come)].* When `OPTION RECOMPILE` is specified (on suitably recent SQL...
View Article
More Pages to Explore .....