Using states as an example, my current data looks like
StateAbbrev | NumOfResults
----------- ------------
MD | 5
VA | 2
DC | 7
MD|VA | 2
CA|NY|VA | 1
I would like it to output the following
StateName | NumOfResults
--------- ------------
Maryland | 5
Virginia | 2
District of Columbia | 7
Maryland,Virginia | 2
California,New York,Virginia | 1
I do have a table that can map StateAbbrev to StateName
I could create a function that would just take the list if pipe separated IDs and spit out a comma separated lists, but i have more then 1 table with this scenario, so i am looking for a cleaner solution. Thank you!