Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gabor - 19 May 2005 10:21 GMT
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
Michel Walsh - 19 May 2005 11:42 GMT
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

> Hi,
>
[quoted text clipped - 22 lines]
> Regards,
> Gabor
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.