Finding unique field values across multiple records

AlanM

Registered User.
Local time
Today, 21:52
Joined
Jul 11, 2004
Messages
28
I have a need to identify unique values across multiple records that are attached to a higher level entity, and concatentate this information into a memo field attached to the higher level entity.

Explanation:

tblLocations: Location ID, name, address, etc
One
to
many
tblServiceTypeMatrix: AreaID, service type 1, service type 2...service type 9.

in which the first field (AreadID) is pulled from a table:
tblAreas: AreaId, AreaDescription
and the other 9 fields (Service Types) are pulled from a table:
tblServiceType: StId, STdescription

So, for each Location there can be many service areas, and each service area can have up to 9 service types specified in its 9 separate service type fields

Example:
LocationA - Area1 - STA, STB, STX,,,,,,,
LocationA - Area2 - STX, STY,,,,,,,,
Location3 - Area3 - STX, STZ,,,,,,,,
LocationB - Area1 - STA, STC, STX,,,,,,,
LocationB - Area2 - STC, STX,,,,,,,,

Any service type can appear in any of the 9 Service type fields (ie. service type C is not always in a particular field of the 9 available)

What I need to do is:
- for each Location, identify the unique service types it provides across all its locations, ie

LocationA - STA, STB, STX, STY, STZ
LocationB - STA, STC, STX

What is the best way to do this please?

All assistance appreciated.

Regards
AlanM
 

Users who are viewing this thread

Back
Top Bottom