Simple Query Question I Think?

romo71

New member
Local time
Today, 13:15
Joined
Oct 12, 2007
Messages
1
I am try to take data from a table:
Modality StartOfWeek AvgOf3rdNextAvailibleAppointment
MAMMO 04-Jun-07 1.25
CT 03-Sep-07 0
MAMMO 03-Sep-07 0
CT 10-Sep-07 0

But I want the query to display like
04-Jun-07 03-sep-07 10-sep-07
MAMMO 1.25 0
CT 0 0

Can this be done?
Thanks

Read a different post and figured it out. Thanks
 
Last edited:
A crosstab query should do the trick.

TRANSFORM First(AvgOf3rdNextAvailibleAppointment)
SELECT Modality
FROM [TableName]
GROUP BY Modality
PIVOT StartOfWeek;

A table has a maximum of 255 fields. So it will work so long as there are less than 255 StartOfWeeks.
.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom