Can I do this via queries??

Surdeymon

Registered User.
Local time
Today, 01:27
Joined
Jun 10, 2004
Messages
11
I have a single query that contains a list of info for say medical patients and services they have used. Example - John had 3 services Mary had 2. I need to create a single line of services for each activity ID. So I am trying to turn this --->

Activity ID Patient Service
123 John AAA
123 John BBB
123 John CCC
124 Mary ZZZ
124 Mary XXX

Into this --->

Activity ID Patient Service
123 John AAA BBB CCC
124 Mary ZZZ XXX

Any ideas on how this can be done? Thanks in advance - Much appreciated!! Rob
 
have you tried a CROSSTAB query?
 
Trying to do a Crosstab

I suppose it has been awhile...Some recs will exceed 255 columns - or at least when I try it states that there are too many crosstab column headers. The thing is If there is more than 6 services for any given ActivityID", then a new line must be created.

This is prob more of a prob than I thought...Thx
 
If you are trying to organize this data for display in a report, create a subreport that has 6 columns to display the services.
 

Users who are viewing this thread

Back
Top Bottom