Joining unrelated data in one table

Ayshan

New member
Local time
Today, 06:34
Joined
Dec 26, 2014
Messages
7
Hi

I have tried to combine data from 3 different tables (unrelated) to make a new one. However, as I understood I can not do this because these 3 tables are unrelated. In my case my 3 tables are for 3 labs' material requirements. I am planning that each lab will fill a form which directly related to there field and direct to me. That is why I intend to have separate tables for each. However, I want to create a table where I will be able to see all the requirements of different Labs altogether. This new table will be kind of Orders. Could someone tell me is it possible to do that and if yes, how?

Thanks in advance
 
If you only want to get all the data from the 3 tables, then you can use a union query.
If you want something else, then show some sample data from the 3 tables and also what result you want to get!
 
The broad strokes of it sounds like you are doing it wrong. Sounds like you need one table, with an additional field to determine which lab the data is for.

Do each of the 3 tables have the same structure? If so, I am right, and this data should go into one table.
 
Yes all of 3 tables structures will be the same.
Chemicals Name
AMount Required
Equipments Present
Equipments Needed

I am planning to have these columns for all three and I would like to extract Chemical Name, Amount required Columns
 
Please give us the big picture in plain English -- sort of a 30000 foot overview of what you are trying to accomplish. I think you are focusing on how you have done or are doing something, and there may be options.

PS: Do not use a naming convention that allows embedded spaces in names.
 
What I am planning to do is gather requirements for chemicals from different labs. Chemicals name is likely to be fixed, but amounts required will change and it is expected to receive new requirements for chemicals every month. So I need to establish a system where I will be able to see which lab needs, what, in which amount. I need to obtain chemical requirement from these labs somehow. Do I type each time what is the amount needed or option 2. Option 2 is I want to prepare separate table for each lab where they will be able to insert these amounts and direct to me. In this case I want to have a common table where I will be able to see all requirements all together. That why I will need to combine 3 unrelated tables having same structure.

And I have another question. If I am able to combine 3 tables in one. After labs send me new requirements the next month and I replace it with the previous lab requirements table, is it possible for the system to establish links, relationships with this new table as it had with previous one, so that system will continue working with new data?
 
From your description, see at least 3 tables.
Primary Keys are underlined. table names in Blue

tblLab
LabId
LabName
LabLocation...



tblChemical

ChemicalID
ChemicalName
otherChemicalSpecificinfo

jnctblLabRequiresChemical
jLabReqChemID
LabID FK
ChemicalID FK
RequiredDate
RequiredAmount


tblLab---->jnctblLabRequiresChemical<----tblChemical

Good luck.
 
Just to clarify--you need 3 tables, but not the 3 you are talking about. The structure jdraw posted is correct for what you have described.

Notice that all 3 of his tables have different structures and are for different entities (Labs, Chemicals and Required Chemicals per lab).
 

Users who are viewing this thread

Back
Top Bottom