M
MurdocUK via AccessMonster.com
Hi,
I'm a bit new to databases, hope someone can help.
I have a query which joins two tables showing applications (defined by a
reference number) that have had mail merge letters sent. I want to modify
this query as some applications have had more than one mail merge letter sent
to more than one recipient (Consultee field).
The two tables are joined on year, ref and district. I would like year, ref
and district to be DISTINCT whilst still displaying the rest of the fields on
the DISTINCT row.
To elaborate, the output from the query is currently: -
Year Ref District Consultee DecType App_Type Cat
2006 43 S EA APST PN 3
2006 44 S AP APRM RMM 1
2006 44 S FS APRM RMM 2
2006 44 S ST APRM RMM 2
2006 44 S AP APRM RMM 5
2006 44 S BW APRM RMM 6
2006 44 S GU APRM RMM 7
2006 45 S NULL APPM FULL 8
I would like the output to list all of the fields but only one row for each
application i.e.
Year Ref District Consultee DecType App_Type Cat
2006 43 S EA APST PN 3
2006 44 S AP APRM RMM 1
2006 45 S NULL APPM FULL 8
There are other fileds in the tables but I have removed them for ease.
Thanks in advance,
Murdoc.
I'm a bit new to databases, hope someone can help.
I have a query which joins two tables showing applications (defined by a
reference number) that have had mail merge letters sent. I want to modify
this query as some applications have had more than one mail merge letter sent
to more than one recipient (Consultee field).
The two tables are joined on year, ref and district. I would like year, ref
and district to be DISTINCT whilst still displaying the rest of the fields on
the DISTINCT row.
To elaborate, the output from the query is currently: -
Year Ref District Consultee DecType App_Type Cat
2006 43 S EA APST PN 3
2006 44 S AP APRM RMM 1
2006 44 S FS APRM RMM 2
2006 44 S ST APRM RMM 2
2006 44 S AP APRM RMM 5
2006 44 S BW APRM RMM 6
2006 44 S GU APRM RMM 7
2006 45 S NULL APPM FULL 8
I would like the output to list all of the fields but only one row for each
application i.e.
Year Ref District Consultee DecType App_Type Cat
2006 43 S EA APST PN 3
2006 44 S AP APRM RMM 1
2006 45 S NULL APPM FULL 8
There are other fileds in the tables but I have removed them for ease.
Thanks in advance,
Murdoc.