oaklanders
Technical User
- Dec 9, 2007
- 38
In my Access 2003 I have this setup:
I currently have this query where I need to find all the records that match the criteria (Smith) and was wondering how I can eliminate the Union All and put it in one SQL:
Code:
TableOne
pocOne pocTwo
2 3
2 4
1 2
TableTwo
TableTwoId Name
1 Jones
2 Smith
3 Edwards
4 Camden
I currently have this query where I need to find all the records that match the criteria (Smith) and was wondering how I can eliminate the Union All and put it in one SQL:
Code:
select * from TableTwo
Inner Join TableOne
on TableTwo.TableTwoId = TableOne.pocOne
where Name = 'Smith'
UNION ALL
select * from TableTwo
Inner Join TableOne
on TableTwo.TableTwoId = TableOne.pocTwo
where Name = 'Smith'