I have a table shown below:
EmpId IdType Id_Number
------- -------- -----------
112211 MRN 30013
112211 Member_Id 40012
223344 MRN 23432
And i want cell values MRN, Member_ID appear as column names in the resulting table as shown below:
EmpId MRN Member_Id
------- -------- -----------
112211 30013 40012
223344 23432 Null
I guess i need to use PIVOT. But it requires to use aggregate functions. Since there is no aggregate function to use here, I am not finding any other to accomplish this.
Any help is much appreciated.