我的表包含六列,例如 ID、QC_ID、Employee_ID、Created_Date、Created_By 我的源表看起来像
ID|QC_ID|Employee_ID|Status|Created_Date|Created_By
__|_____|___________|______|____________|___________
1| 1 | 1001 | P | 30-08-2019 | 101
2| 1 | 1002 | A | 30-09-2019 | 101
3| 1 | 1003 | P | 30-10 -2019| 101
4| 1 | 1001 | A | 30-10-2019 | 101
5| 1 | 1002 | P | 30-08-2019 | 101
6| 1 | 1002 | A | 30-10-2019 | 101
7| 1 | 1003 | A | 30-08-2019 | 101
8| 1 | 1003 | A | 30-09-2019 | 101
9| 1 | 1001 | A | 30-09-2019 | 101
and my pivote table should be look like:
ID|QC_ID|Employee_ID|30-08-2019|30-09-2019|30-10-2019
__|_____|___________|__________|__________|___________
1| 1 | 1001 | P | A | A
2| 1 | 1002 | P | A | A
3| 1 | 1003 | A | A | P