Have a requirement as below,
- Table1 having Employee ids and Managers id
- Query1 having only distinct manager ids
Requirement: Create a query with Employee id and an expression as Whether that employee is a manager or not
SELECT [Table1].Empld,
IIf(((Select count(*) from [Query1] where [Query1].[Manager]=[Table1].[Empld]) > 0),"Yes","No") AS IsManager
FROM [Table1]
But this query is not working :(. Please advise how we can achieve this
Updating additional comments:
Table1:
Empld |
Manager |
1 |
9 |
2 |
1 |
3 |
1 |
4 |
1 |
5 |
2 |
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…