i have two sql queries.
select EmployeeID,FName from [Mydatabase].[dbo].EMPLOYEE_TABLE where EmployeeID not in
(select ManagerID from [Mydatabase].[dbo].ORG_UNIT where OrgUnitID = '5')and OrgUnitID = '5'
this returns two rows.
and there is another query..
(select EmployeeID,FName from [Mydatabase].[dbo].EMPLOYEE_TABLE where EmployeeID in
(select ManagerID from [Mydatabase].[dbo].ORG_UNIT where ParentTeamID = '5'))
this returns one row.
i want to combine the results so as to get ultimately three rows.. is there a way to do that???
If an employee can match both criteria, replace
UNION ALLwithUNIONso that oneidwill not be returned twice.