| Fullname | department |code |
| -------- | -----------|-------------------|
| John Doe | Marketing |AB.marketing.1240 |
| John Doe | sales |AB.sales.30 |
| John Doe | service |AB.service.2000 |
| John Doe | customer |AB.customer.11023 |
I have a table in above format with name and department details. I am looking for a way convert all the rows under department to a separate columns so that the table will look like the below table. For each fullName, I am expecting to extract marketing, sales,service etc in a single row as below.
| Fullname | Marketing |sales |service |customer |
| -------- | ----------------- |-------------------|----------------|-----------|
| John Doe | AB.marketing.1240 |AB.sales.30 |AB.service.2000 | AB.customer.11023|