Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT m.MeetsID, m.MeetName, m.MeetDate, m.MeetSite FROM Meets m INNER JOIN MeetTeams mt ON m.MeetsID = mt.MeetsID INNER JOIN Roster r ON "
sql = sql & "mt.TeamsID = r.TeamsID INNER JOIN IndRslts ir ON ir.MeetsID = mt.MeetsID WHERE ir.RosterID IN (" & sSelectQS & ") AND ir.Place > 0 "
sql = sql & "AND (m.MeetDate >= '" & dBegDate & "' AND m.MeetDate <= '" & dEndDate & "') AND Sport = '" & sSport & "' ORDER BY m.MeetSite DESC"
rs.Open sql, conn2, 1, 2
Do While Not rs.EOF
If x = 0 Then
AllMeets(0, x) = rs(0).Value
AllMeets(1, x) = Replace(rs(1).Value, "''", "'") & " (" & Month(rs(2).Value) & "/" & Year(rs(2).Value) & ")"
AllMeets(2, x) = rs(2).Value
AllMeets(3, x) = Replace(rs(3).Value, "''", "'")
x = x + 1
ReDim Preserve AllMeets(3, x)
Else
For z = 0 To UBound(AllMeets, 2) - 1
If CLng(rs(0).Value) = CLng(AllMeets(0, z)) Then
Exit For
Else
If z = UBound(AllMeets, 2) - 1 Then
AllMeets(0, x) = rs(0).Value
AllMeets(1, x) = Replace(rs(1).Value, "''", "'") & " (" & Month(rs(2).Value) & "/" & Year(rs(2).Value) & ")"
AllMeets(2, x) = rs(2).Value
AllMeets(3, x) = Replace(rs(3).Value, "''", "'")
x = x + 1
ReDim Preserve AllMeets(3, x)
End If
End If
Next
End If
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
ASKER
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.
TRUSTED BY
ASKER