in a query - a way to merge 2 tables into one?

richy1

New member
Local time
Yesterday, 21:55
Joined
Nov 14, 2007
Messages
6
Hi all. Is there some way to merge 2 tables into one in a query? Is it possible? Thank u.
 
Yes its possible but we wwould need to know more about the structure of the tables if we are to advise you on how to do it
 
Are you reffering to joining the tables to display fields from each table or having each record in the table combined into one query. If you are reffering to the second option you need a union query.
 
Keith beat me to it. Look up UNION queries. It's in Access Help.
 
I have this going already -

SELECT Item_Name, ID, Item_No From accessories
UNION select Item_Name, ID, Item_No From bars;

which does indeed use UNION to merge tables. BUT i must be able to merge columns from tables to one big column, so perhaps i was not toally clear in the first questions. I know it doesnt make any sense really why i should bother doing that - for the only reason is that i have a website and runs a search script in which i must be able to merge all these tables, and then merge 2 coulns in each table as well (that would be a products Name and ID).

Sorry its a tricky thing to do, so ive managed to combind tables - but now i need to be able to merge colmns in each table into one big massive one. There are 22 tables in the main database. Is it feasible do u think?
 
Any ideas guys? Perhaps i ever did it with my info in the last - i have 22 tables, each with 5 coumns of data. I need to create a query where i can merge all the date and 2 coulmns into one big column - any ideas on how to merge 2 columns? thx.
 
Any ideas guys? Perhaps i over did it with my info in the last - i have 22 tables, each with 5 coumns of data. I need to create a query where i can merge all the date and 2 coulmns into one big column - any ideas on how to merge 2 columns? thx.
 
to merge to columns into one use the below syntax in the query desinger

NameOfNewColumn: [Column1Name] & [Column2Name]
 

Users who are viewing this thread

Back
Top Bottom