So I've got 4 tables:
Servers
Approvers
Reviewers
Groups
I have laid samples out of each table below. What I am trying to achieve is to look at a list of all the servers, and if they have an approver, list the approver. Also, if an entry from the servers table matches a server in the reviewers table, to list the reviewer & their email. And if a reviewer exists, check for a match on the groups table (the reviewer could be a person or a group). And if a match is found, provide the email from the groups table. Server3 exists with no approver or reviewer.
Servers Table:
<tbody>
</tbody>
Approvers Table
<tbody>
</tbody>
Reviewers Table
<tbody>
</tbody>
Groups Table
<tbody>
</tbody>
RESULTS TABLE
<tbody>
</tbody>
Any and all help is greatly appreciated.
Servers
Approvers
Reviewers
Groups
I have laid samples out of each table below. What I am trying to achieve is to look at a list of all the servers, and if they have an approver, list the approver. Also, if an entry from the servers table matches a server in the reviewers table, to list the reviewer & their email. And if a reviewer exists, check for a match on the groups table (the reviewer could be a person or a group). And if a match is found, provide the email from the groups table. Server3 exists with no approver or reviewer.
Servers Table:
Server |
Server1 |
Server2 |
Server3 |
<tbody>
</tbody>
Approvers Table
Server | Approver |
Server1 | User1 |
Server2 | User2 |
Server1 | User2 |
<tbody>
</tbody>
Reviewers Table
Server | Reviewer | |
Server1 | Group1 | group1@email |
Server2 | Reviewer1 | reviewer1@email |
<tbody>
</tbody>
Groups Table
Group | |
Group1 | group1@email |
Group2 | group2@email |
<tbody>
</tbody>
RESULTS TABLE
Server | Approver | Reviewer | ReviewerEmail | GroupEmail |
Server1 | User1 | Group1 | group1@email | group1@email |
Server1 | User2 | Group1 | group1@email | group1@email |
Server2 | User2 | Reviewer1 | reviewer1@email | |
Server3 |
<tbody>
</tbody>
Any and all help is greatly appreciated.