Here's my sample data:
Campaign Market
1 Los Angeles
1 New Orleans
1 St. Louis
2 Orlando
2 Seattle
I want to create a temporary table which will only have one record per Campaign value. All the Market values corresponding to that campaign will be combined into one string, separated by commas.
My desired result:
Campaign Market
1 Los Angeles, New Orleans, St. Louis
2 Orlando, Seattle
Campaign Market
1 Los Angeles
1 New Orleans
1 St. Louis
2 Orlando
2 Seattle
I want to create a temporary table which will only have one record per Campaign value. All the Market values corresponding to that campaign will be combined into one string, separated by commas.
My desired result:
Campaign Market
1 Los Angeles, New Orleans, St. Louis
2 Orlando, Seattle