Lisa writes "I need to minimize the size of our reports when data is redundant for the same key, by appending values for some of the columns.Keys: Location, Scource, Date. (not shown)Additional keys that can be combined: Line of Business, Medical Category, Forecasting Scenario. Here is an example with data with the same key.Key LOB Category Scenario Trend... Commercial Primary Physician Most Likely +5... Commercial Specialist Most Likely +5... Flexcare Primary Physician Most Likely +5... Flexcare Specialist Most Likely +5... Commercial Primary Physician Pessimistic +3... Commercial Primary Physician Optimistic +6
Desired Results (with abbreviations for readability)... Comm,Flex Primary,Special Most Likely +5... Comm Primary Pessimistic +3... Comm Primary Optimistic +6
etcI looked at using a variable with coalesce, but haven't gotten it to work within a derived table. I'm trying to stay away from cursors due to performance since the volume of data is very large and the reports are run real time from a web page.Thanks for your help!"