I need to created a query in MS Access 2010 that combines data from 4 different tables in one column.
The tables are defined as below;
Table 1: date, country, channel, calls_in
Table 2: date, country, channel, calls_out
Table 3: date, country, channel, email
Table 4: date, country, channel, chat
The query should look like:
Query 1: Date, country, channel, contacts
The contacts column should combine the 4 contact types (i.e. calls_in/out, email and chat) for the appropriate date, country and channel.
All 4 tables have the same dates and countries. Channel is specific to each table.
I have been trying to get this done but can’t get my head around it.
You might be after this:
Since MS-Access doesn’t support FULL OUTER JOINS, and doesn’t have an aggregate function like GROUP_CONCAT, I’m left joining a UNION subquery that contains all of the dates, countries and channels with every table, and I’m then combining all the contacts (calls_in, calls_out, email and chat) into one cell.