I am trying to create a SQL query (SQL Server) that will take what is currently in rows and spread out over a column. For example, the data currently displays like this:
lookup_key group_name
100 CARDIOVAS
100 CARDIOVASMS
101 AUDIOLOASS
101 AUDIOLOASSPA
101 AUDIOLOASSMA
I would like to have the data display as follows:
lookup_key group_name1 group_name2 group_name3
100 CARDIOVAS CADRIOVASMS
101 AUDIOLOASS AUDIOLOASSPA AUDIOLASSMA
Does anyone have any ideas? Please let me know if you need further info.
lookup_key group_name
100 CARDIOVAS
100 CARDIOVASMS
101 AUDIOLOASS
101 AUDIOLOASSPA
101 AUDIOLOASSMA
I would like to have the data display as follows:
lookup_key group_name1 group_name2 group_name3
100 CARDIOVAS CADRIOVASMS
101 AUDIOLOASS AUDIOLOASSPA AUDIOLASSMA
Does anyone have any ideas? Please let me know if you need further info.