Andrew Truckle
Andrew Truckle

Reputation: 19107

SQL query to combine the results from two tables

I have these two tables and I want to build a SQL query:

enter image description here

My search criteria is:

I want the resulting view to be a single list of all records, sorted by date (fields Talk Date and Last Given).

So:

I am interesting in this info:

Talk Date, Talk Number, Congregation, Brother

Last Given, Talk Number, Congregation, Speaker

I would like to pull the above two sets of results into a single list sorted by the date column.

I started to do a SQL query in Access 2016 but am lost!

Upvotes: 1

Views: 608

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1269793

You can use union all:

select [Talk Date], [Talk Number], Congregation, Brother as Speaker
from [Away Talks]
union all
select [Last Given], [Talk Number], Congregation, Speaker
from [Home Talks]
order by [Talk Date]

  

Upvotes: 2

Related Questions