These posts were previously published on the DBA Stack Exchange site, and have been cross-posted here for ad-free posterity. I’m no longer active with responding to questions on the Stack Exchange Network, and consider these to be the canonical links for my answers. If I update any of my responses to correspond to changing technology, they will only be updated on my own site, and not on the Database Administrators Stack Exchange site.
SQL Main query value used in the WHERE in the subquery
Question I’m really confused by this SQL here, I have this sample where I am using the value from the main query in the subquery and then using XML PATH to add a comma between the dates. The setup is 2 tables one with the … [Read More]