Merging Coulmns in separate tables

K

kfowlow

I have sample data from different labs in two different tables. The results
from the labs have been equalized so that I can merge the data from the two
tables together. Now what I want to do is to make a query to merge the data.
These are separate samples from different labs so there are no keys that are
the same. How do I go about doing this in a query? Also, I am going to be
adding more samples to the tables. How do I append samples to this merged
table.

Thanks
 
K

KARL DEWEY

Need 'Input'!
What are field names and datatypes? Post sample data from each table.
 
K

kfowlow

Karl,
Thanks for replying. Here is a generic list of data.

Table 1
SampleID Lab# Data
1000 1 1005
1001 1 900
1002 1 850
1003 1 925

Table 2
SampleID Lab# Data
2000 2 500
2001 2 450
2002 2 900
2003 2 840

As you can see the data is fairly straight forward. What I want to do now is
to make one table out of the two tables. Cannot really use append. Create
table is really the only way to go. What I may have to do is to make one
table with Table 1 and then append Table 2 to the end. That would make me
generate two queries.

Any help is appreciated.
Thanks
 
J

John W. Vinson

I have sample data from different labs in two different tables. The results
from the labs have been equalized so that I can merge the data from the two
tables together. Now what I want to do is to make a query to merge the data.
These are separate samples from different labs so there are no keys that are
the same. How do I go about doing this in a query? Also, I am going to be
adding more samples to the tables. How do I append samples to this merged
table.

Thanks

If you have no way to identify which record in one table is for the same
sample as a record in the other table ("no keys") then I cannot imagine any
way to do so. If you had these results printed on two stacks of paper, how
would you pair them up?
 
K

KARL DEWEY

If you want the data to look like this --
SampleID Lab# Data
1000 1 1005
1001 1 900
1002 1 850
1003 1 925
2000 2 500
2001 2 450
2002 2 900
2003 2 840

then use a union query like this ---
SELECT [SampleID], [Lab#], [Data]
FROM [Table 1]
UNION ALL SELECT [SampleID], [Lab#], [Data]
FROM [Table 2];
 

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