我有三个表如下:
tblHelpdeskType(需要加入tblHelpdesk)
HelpdeskTypeID | HelpdeskType | Current
1 | Not Specified | -1
2 | Feature Request | -1
3 | Account Request | -1
4 | Permission Requested | -1
5 | Bug | -1
tblHelpdesk(主表)
HelpdeskID||HelpdeskTypeID||HelpdeskPriorityID||RequestBy||DateTimeStamp||HelpdeskStatusID
1 || 1 || 2 ||sothorn || 12/12/12 || 1
2 || 3 || 1 ||Chantra || 12/12/12 || 1
3 || 1 || 1 ||Lyhong || 12/12/12 || 2
4 || 3 || 1 ||bongthom || 12/12/12 || 1
tblHelpdeskStatus (需要加入 tblHelpdesk )
HelpdeskStatusID | HelpdeskStatus
1 | Pending
2 | View
3 | In treatment
4 | Closed
我需要的结果是:
Type | Pending | View | In treatment | Closed |
----------------------------------------------------------------|
Not Specified | 1 | 1 | | |
----------------------------------------------------------------|
Feature Request | 2 | | | |
----------------------------------------------------------------|
Account Request | | | | |
----------------------------------------------------------------|
Permission Requested | | | | |
----------------------------------------------------------------|
Bug | | | | |
----------------------------------------------------------------|