The following query is giving me double results. How can I modify it to not do that?
SELECT ir.ParticipantID FROM IndResults ir INNER JOIN Participant p ON ir.ParticipantID = p.ParticipantID INNER JOIN PartRace pr ON ir.RaceID = pr.RaceID WHERE pr.RaceID = 386 AND ir.RaceID = 386 AND p.Gender = 'F' AND pr.Age >= 55 AND pr.Age <= 59 ORDER BY ir.EventPl
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs).
Being someone who is always looking for alternatives to "work your data", I came across this …