Eliminating NULLs when using CASE in SQL Server SELECT statement
问题 I have a large, messy report to write that joins across 5 tables. There is one column in one table that is being used for several different values--essentially a "tag" column, where the tags are used in creative ways depending on what kind of miscellaneous metadata the users want to use. As a result, my query for the report returns 3 nearly-identical rows that differ only in the "tag" column; for instance, I might get: NAME TAG EMAIL BOB A BOB@EXAMPLE.COM BOB B BOB@EXAMPLE.COM BOB C BOB