I promise to get back to writing articles on a more regular basis soon, but in the meantime, here's a comment from Nathan A. on using DISTINCT and ORDER BY: Jeff, This is actually a problem I have been puzzling over for quite a while now.
Read more →
Let's take a look at another one of those stupid, arbitrary SQL Server error messages that Bill Gates clearly only created because Micro$oft is evil and incompetent and they want to annoy us (and probably kill baby squirrels, too): Msg 145, Level 15, State 1, Line 4ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
Read more →