Results Navigation
Use the controls below to drill down into these results
|
|
Jun
07
2009
|
National Sprint Triathlon Championships (750m swim/20k cycle/5k run)
|
Rate this information
| Not rated |
| No feedback available for this area |
WITH resultSet AS (SELECT Results.ResultId FROM Results WITH (NOLOCK) WHERE Results.RaceId=595)
, spt10260 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10260 And Splits.Duration Is Not NULL), spt10255 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10255 And Splits.Duration Is Not NULL), spt10256 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10256 And Splits.Duration Is Not NULL), spt10257 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10257 And Splits.Duration Is Not NULL), spt10258 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10258 And Splits.Duration Is Not NULL), spt10259 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10259 And Splits.Duration Is Not NULL)
SELECT
ROW_NUMBER() OVER( ORDER BY CASE WHEN Placing IS NULL THEN 1 ELSE 0 END, Placing ASC
, CASE WHEN Finish IS NULL THEN 1 ELSE 0 END, Finish ASC
) AS RowNumber ,ISNULL(Results.Status,'') AS Status
,ISNULL(Results.Laps,0) AS Laps
,Results.Firstname
,Results.Lastname
,Results.Firstname + ' ' + Results.Lastname AS Competitor
,Results.RaceNumber
,ISNULL(Results.Category, '') AS Category
,ISNULL(Results.Team,'') AS Team
,ISNULL(Results.Club, '') AS Club
,Results.Gender
,Gender.Keyword AS GenderStr
,Results.ResultId
,Results.Placing
,Results.RaceId
,Events.EventManagerId
,ISNULL(Results.Notes,'') AS Notes
,'' AS StaticData, spt10260.Duration AS [Splt_10260]
, spt10255.Duration AS [Splt_10255]
, spt10256.Duration AS [Splt_10256]
, spt10257.Duration AS [Splt_10257]
, spt10258.Duration AS [Splt_10258]
, spt10259.Duration AS [Splt_10259]
FROM Results WITH (NOLOCK) INNER JOIN Races WITH (NOLOCK) ON Races.RaceId=Results.RaceId INNER JOIN resultSet WITH (NOLOCK) ON resultSet.ResultId=Results.ResultId INNER JOIN Events WITH (NOLOCK) ON Events.EventId=Races.EventId
LEFT OUTER JOIN Keywords Gender WITH (NOLOCK) ON Gender.KeywordId=Results.Gender AND Gender.Language='English' AND Gender.GroupName='Gender'
LEFT OUTER JOIN spt10260 WITH (NOLOCK) ON spt10260.ResultId=Results.ResultId
LEFT OUTER JOIN spt10255 WITH (NOLOCK) ON spt10255.ResultId=Results.ResultId
LEFT OUTER JOIN spt10256 WITH (NOLOCK) ON spt10256.ResultId=Results.ResultId
LEFT OUTER JOIN spt10257 WITH (NOLOCK) ON spt10257.ResultId=Results.ResultId
LEFT OUTER JOIN spt10258 WITH (NOLOCK) ON spt10258.ResultId=Results.ResultId
LEFT OUTER JOIN spt10259 WITH (NOLOCK) ON spt10259.ResultId=Results.ResultId
ORDER BY CASE WHEN Placing IS NULL THEN 1 ELSE 0 END, Placing ASC
, CASE WHEN Finish IS NULL THEN 1 ELSE 0 END, Finish ASC
|