I have a table like this.
Source
ID contactType Phone No.
1 Office 1234567
1 Hotline 1234567
1 Fax 1234567
1 After Hours 1234567
My requirement is like this.
Target
ID OfficePhone hotline Fax After Hours
1 1234567 1234567 1234567 1234567
From the source table, I split the columns and made a UNION ALL but still could not get it in one record.
Then I made the Group by id and made an INNER join with the rest of the columns but still could not get it in one record.
Can any one tell me the method to do this?
Source
ID contactType Phone No.
1 Office 1234567
1 Hotline 1234567
1 Fax 1234567
1 After Hours 1234567
My requirement is like this.
Target
ID OfficePhone hotline Fax After Hours
1 1234567 1234567 1234567 1234567
From the source table, I split the columns and made a UNION ALL but still could not get it in one record.
Then I made the Group by id and made an INNER join with the rest of the columns but still could not get it in one record.
Can any one tell me the method to do this?