I have a view that compares values in 2 tables and indicates whther various fields match or not. The query follows this format:SELECT Table1.A, Table2.A, CASE WHEN Table1.A = Table2.A THEN 'Match' ELSE 'No Match' END AS [A Compare], Table1.B, Table2.B, CASE WHEN Table1.B = Table2.B THEN 'Match' ELSE 'No Match' END AS [B Compare],
And so on for about 30 columns. Now the business users have asked for an additional column that lists which fields were "No Match" for each row. So if a row had "No Match" for columns A, B and F but matched on all others, then that new column needs to have "A, B, F" as the value for that row. Since this could include anywhere from 1 to 30 columns, I need a way to concatenate all those "No Match" columns and insert it into that new column in the view. So far I'm having no luck. Any ideas appreciated!