Sunday, February 12, 2012

Converting Rows to Columns

Hi,
I have this resultset :
Mem_id Specialization
19001 Internal medicine
19001 Endoscopy
19001 Oncology

I need to output this like below--(in 1 row)

19001 Internal medicine Endoscopy Oncology

I am using SQL2005. Can anyone please help asap.

ThanksUse Pivot function on SQL2005.

No comments:

Post a Comment