Sniper-BoOyA-
Registered User.
- Local time
- Today, 06:33
- Joined
- Jun 15, 2010
- Messages
- 204
Good morning,
I am working on a database which is supposed to be able to aid the people working in our laboratory by doing calculations, making graphs etc.
Everything works great, but theres just one thing that i can not figure out.
The basic idea is, that the manager of the lab registers samples which need to be tested. (they are numbered)
In this process the person in the lab selects a sample on which a test has to be done with a 'Proctor' to calculate the Moisture content and the density of the particular sample.
In order to do that they take some of the original sample and put it in a mold, then the proctor machine hits the sample a couple of times.
Anyways, sometimes they stir two samples together (if they are the same) because its it useless to do the proctor test on both of the samples when they are the same...
Anyway, on the form to select the samples that need to be tested (the selected sample will get a proctorID which is an autonumbering field) , the user also gets to select the ProctorID's. Which are finally stored in a different table.
tblproctor = original table where the proctorid's are stored
tblsampleproctor = table where the stirred samples are stored
example :
tblproctorid has ProctorID 1 on sample 1
tblsampleproctor has ProctorID 1 on sample 2 and 3
Which basiacallt means that sample 1,2 and 3 are stirred together as one sample.
To combine the 2 tables above i used the UNION ALL function :
Which combines both tables and displays them as one.
Example :
ProctorID _______ Samplenr
1 _______________1
1________________2
1________________3
Now, what i am trying to do is to display all samplenr's corresponding to proctorID1 in one field so i can show all the corresponding samplenr's on a report.
As in:
ProctorID___________Samplenr
1 __________________1+2+3
But i cant get it to work.
Any help would be much appreciated.
Ps. Sorry for the long post. Just trying to clear things up here and there so you guys know what im trying to do here.
Thanks in Advance!
Regards,
Michael Schrijver
I am working on a database which is supposed to be able to aid the people working in our laboratory by doing calculations, making graphs etc.
Everything works great, but theres just one thing that i can not figure out.
The basic idea is, that the manager of the lab registers samples which need to be tested. (they are numbered)
In this process the person in the lab selects a sample on which a test has to be done with a 'Proctor' to calculate the Moisture content and the density of the particular sample.
In order to do that they take some of the original sample and put it in a mold, then the proctor machine hits the sample a couple of times.
Anyways, sometimes they stir two samples together (if they are the same) because its it useless to do the proctor test on both of the samples when they are the same...
Anyway, on the form to select the samples that need to be tested (the selected sample will get a proctorID which is an autonumbering field) , the user also gets to select the ProctorID's. Which are finally stored in a different table.
tblproctor = original table where the proctorid's are stored
tblsampleproctor = table where the stirred samples are stored
example :
tblproctorid has ProctorID 1 on sample 1
tblsampleproctor has ProctorID 1 on sample 2 and 3
Which basiacallt means that sample 1,2 and 3 are stirred together as one sample.
To combine the 2 tables above i used the UNION ALL function :
Code:
SELECT monsternr, proctorid
FROM tblproctor
UNION ALL SELECT monsternr, proctorid
FROM tblsampleproctor
ORDER BY proctorid;
Which combines both tables and displays them as one.
Example :
ProctorID _______ Samplenr
1 _______________1
1________________2
1________________3
Now, what i am trying to do is to display all samplenr's corresponding to proctorID1 in one field so i can show all the corresponding samplenr's on a report.
As in:
ProctorID___________Samplenr
1 __________________1+2+3
But i cant get it to work.
Any help would be much appreciated.
Ps. Sorry for the long post. Just trying to clear things up here and there so you guys know what im trying to do here.
Thanks in Advance!
Regards,
Michael Schrijver
Last edited: