Alternative to a Union Query

nancybrown

Well-known Member
Joined
Apr 7, 2005
Messages
868
Is there an alternative to a Union query that will join "all" records from two tables . . . need flexibility to update, modify, and build additional queries.

Many thanks.
 

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

james_lankford

Well-known Member
Joined
Jan 11, 2009
Messages
1,178
select *
from t1
union all
select *
from t2

but they must have the same # of columns and column types
 

nancybrown

Well-known Member
Joined
Apr 7, 2005
Messages
868
To further explain because I'm not always clear in what I'm trying to achieve. I need to bring in "one" column from a 2008 terms file and match by vendor ID into 2009 terms file table. I was successful in creating queries to get same terms and no change terms, but now I need all terms in one file showing before and after . . . but again, I only need to bring in one field to display side-by-side in the 2009 file. If it can't be done in Access, I suppose I can do a match statement in Excel and import it in to Access. I appreciate any suggestions
 

james_lankford

Well-known Member
Joined
Jan 11, 2009
Messages
1,178
still not sure what you want, but this brings in one filed from the 2009 table and one from the 2008 able and displays them side by side
Code:
select 
  t9.column1,
  t8.column1
from
  2009table as t9
  left join
  2008table as t8
on
  t9.vendorID = t8.vendorID
 

Watch MrExcel Video

Forum statistics

Threads
1,123,156
Messages
5,600,049
Members
414,357
Latest member
Gemma_R

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top