Is it possible to merge two or more columns in one table query?

G

Guest

Hi,

I have tables that looks like this:

ID Column 1 Column 2 Column 3
1 A B C

And I would like the result to look like:

ID Column
1 A
1 B
1 C

Right now the way I do this, I run an append query on ID and Column 1, and
than I run another append query on ID and Column 2, and another on ID and
Column 3, and append the result into one table. Now If I have 30 columns
which I want to merge, would that mean that I have to run 30 differrent
append query in able to have the results merged into one column or there is
an easier way to do?

Thanks for the help!

Regards,
Gabor
 
M

Michel Walsh

Hi,


SELECT ID, Column1 As Column FROM myTable
UNION ALL
SELECT ID, Column2 FROM myTable
UNION ALL
SELECT ID, Column3 FROM myTable





Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top