Comments posted to this topic are about the item That Case Filter
Hey guys, here's the full story behind that question. And no there is no typo in it.
I was trying to debug something fast for someone on ssc.com when I ran the exact code posted in the QOTD. I swear it took me a good 5 minutes to realize the extra union all was there (copy / paste error).
By then I was wasting my time researching KB bugs about different set options.
Steve and I went back and forth with this question and the exact wording to use. The bottom line was that I wanted you to be in the same situation I was when I was facing this "issue". I spent the first 2-3 minutes trying to debug the case filter and then about the same time researching for bugs and behavior on set options.
Also the title was misleading so not to give the answer away (like I wasn't going to name this "Too many union alls???").
I went back and forth on wether or not to post the question because I knew some of you wouldn't like it but I think this is a valuable lesson (it was for me anyways).
When something just doesn't make sense you need to test the most basic assumptions.
It's also a good reminder to not rush through things and not work when you're too tired (which I was that afternoon).
This is also meant as a fun discussion starter. You can use this scenario to laugh at me if you want (
<Some supreme being> knows I did).
So tell us about the last time you did something dumb, stupid, funny like this with Sql Server?