Create a query that takes 2 columns and merge them into 1 (1 Viewer)

cdoyle

Registered User.
Local time
Yesterday, 21:58
Joined
Jun 9, 2004
Messages
383
Hi,
It's been a long time since I've done much in Access, but I need to run a query and not quite sure how to build it.

I have a table in SharePoint that has 2 columns (email, and additional email).
There are times where emails in the first column is used, and times where emails in the second column is used.

I have created 2 queries that pull the info I need for each condition.

what I need to do now, is create a query that takes the results of these 2 queries and puts everything in 1 column. I need to use these emails in a report.

So basically I have this
query 1:
email column 1
email 1
email 2

query 2
email column 2
email zzz
email xyz

and I need a final result of this

All Emails
Email 1
email 2
email zzz
email xyz

Is a union query the way I need to go?
 

RainLover

VIP From a land downunder
Local time
Today, 14:58
Joined
Jan 5, 2009
Messages
5,041
It would be good if you defined your Table Structure.

Await your reply.
 

cdoyle

Registered User.
Local time
Yesterday, 21:58
Joined
Jun 9, 2004
Messages
383
It's a SharePoint list so it's only one 'table'
The 2 columns I have are 'email' and 'alternate email'
 

RainLover

VIP From a land downunder
Local time
Today, 14:58
Joined
Jan 5, 2009
Messages
5,041
Sorry about the delay.

I don't use Union or Crosstabs so I can't help along those lines.

But what I would do is to create a Temp Table and append each Group. One at a time. 2 in all.
 

MSAccessRookie

AWF VIP
Local time
Today, 00:58
Joined
May 2, 2008
Messages
3,428
Hi,
It's been a long time since I've done much in Access, but I need to run a query and not quite sure how to build it.

I have a table in SharePoint that has 2 columns (email, and additional email).
There are times where emails in the first column is used, and times where emails in the second column is used.

I have created 2 queries that pull the info I need for each condition.

what I need to do now, is create a query that takes the results of these 2 queries and puts everything in 1 column. I need to use these emails in a report.

So basically I have this
query 1:
email column 1
email 1
email 2

query 2
email column 2
email zzz
email xyz

and I need a final result of this

All Emails
Email 1
email 2
email zzz
email xyz

Is a union query the way I need to go?

Have you tried a UNION Query? It sounds like that would be a great start.
 

Users who are viewing this thread

Top Bottom