Thanks for the reply, but your suggestion did not work. I have now resolved the problem, and my final SELECT query now looks like this :-
SELECT * FROM
(
SELECT * FROM vuWeighTicketReport
WHERE [TicketDate] >= '2010-09-10'
) AS Tickets PIVOT
(
SUM(ProductWeight) FOR ProductCode IN
(
[Blood],[Bonecake],[Carcass],[CFat],[Desiel],[DMeal],[Feather],
[FMeal],[Greaves],[Head],[Misc],[Offal],[PBlend],[PFB],[PMeal],
[Skin],[Slurry],[Tail],[Tallow],[TBottom],[Thigh],[TMeal],[Wash]
)
) AS TicketProductWeights
The only difference to the original is that I have added AS TicketProductWeights to the end. Typically, the problem was stiring me in the face, and I couldn't see it. :doh: Thanks again.
Steve Jowett ------------------------- Real Programmers don't need comments -- the code is obvious.