SQL Server - Solve this with set-based solution instead of row iteration
问题 I'm trying to move some of my business logic out of my programs and into stored procedures. I'm really a VB.NET programmer, and not a SQL expert, but I'm learning more SQL and finding that in a lot of cases, it's faster to let SQL do my processing and return small amounts of data rather than giving me a ton of stuff and having my programs chomp through it. So, my current problem is this: I'm creating a timeline of something that has occurred from several different sources in a database. The