D
dabooj via AccessMonster.com
hi,
I have a query which shows the info i require. It shows Examiners & the
programme types they are associated to.
Each examiner must have 1 programme type but can have a max 2 programme types.
The query shows the data as expected. If the examiner has 1 programme type
then there is one record for them but if they have 2 prog types then 2
records appear. This is because the query is based on 2 tables: tblExaminer
and tblProgType. There is a one-to-many relationship between these but i have
added restrictive code to only allow a max of 2 records per examiner. The
query looks like this:
ExaminerId - ExaminerName - ProgType - ProgDesc
1 - John - UG - UG BSC Chemistry
1 - John - PG - MA Chemistry
2 - Joe - UG - Bsc Hons Biology
3 - Jim - PG - PHd physics
what i need is the ug & pg info appearing on one record line for the examiner
so only one line (one record) exists for each examiner. eg:
ExaminerId - ExaminerName - UGProgType - UGProgDesc - PGProgType -
PGProgDesc
1 - John - UG - UG BSC Chemistry
- PG - MA Chemistry
2 - Joe - UG - Bsc Hons Biology
- -
3 - Jim - -
- PG - PHd physics
I have been trying to get this working using a union query but i can't seem
to get me finger on it. It seems to be an issue that may be quite common
within a relational database but i can't seem to find a solution for this.
Please note this is not an attempt to concatenate the 2 seperate fields into
one but to show them as seperate fields within the same record rather than
appearing as 2 records in the query.
Anyone have any ideas how i need to do this?
Any help would be greatly appreciated.
thank you,
Shuja
I have a query which shows the info i require. It shows Examiners & the
programme types they are associated to.
Each examiner must have 1 programme type but can have a max 2 programme types.
The query shows the data as expected. If the examiner has 1 programme type
then there is one record for them but if they have 2 prog types then 2
records appear. This is because the query is based on 2 tables: tblExaminer
and tblProgType. There is a one-to-many relationship between these but i have
added restrictive code to only allow a max of 2 records per examiner. The
query looks like this:
ExaminerId - ExaminerName - ProgType - ProgDesc
1 - John - UG - UG BSC Chemistry
1 - John - PG - MA Chemistry
2 - Joe - UG - Bsc Hons Biology
3 - Jim - PG - PHd physics
what i need is the ug & pg info appearing on one record line for the examiner
so only one line (one record) exists for each examiner. eg:
ExaminerId - ExaminerName - UGProgType - UGProgDesc - PGProgType -
PGProgDesc
1 - John - UG - UG BSC Chemistry
- PG - MA Chemistry
2 - Joe - UG - Bsc Hons Biology
- -
3 - Jim - -
- PG - PHd physics
I have been trying to get this working using a union query but i can't seem
to get me finger on it. It seems to be an issue that may be quite common
within a relational database but i can't seem to find a solution for this.
Please note this is not an attempt to concatenate the 2 seperate fields into
one but to show them as seperate fields within the same record rather than
appearing as 2 records in the query.
Anyone have any ideas how i need to do this?
Any help would be greatly appreciated.
thank you,
Shuja