Hello everyone,
I am calling on you to see how I can optimize these SQL queries (access and ASP).
Base Query :
tSql = "SELECT sectionID, detailSectionID, banID, judgeID, raceID, sectionURL, nbrIns, nbrExp FROM tblDetailSections WHERE detailExpoID = 111
Set Res = dbLink.Execute(tSql)
Other queries related to the Base query :
tSql = "SELECT sectionID, nomSection FROM tblSections WHERE sectionID = " & Res("sectionID")
Set ResNom = dbLink.Execute(tSql)
tSql = "SELECT judgeID, nameJudge, city FROM tblJudges WHERE judgeID = " & Res("judgeID")
Set ResJuge = dbLink.Execute(tSql)
tSql = "SELECT banID, banUrl, banPath FROM tblBans WHERE banID = " & Res("banID")
Set resBan = dbLink.Execute(tSql)
tSql = "SELECT raceID, descRace FROM tblRaces WHERE raceID = " & Res("raceID")
Set resRace = dbLink.Execute(tSql)
How can I put everything together instead of having 5 different queries?
Thank you
w11z
I am calling on you to see how I can optimize these SQL queries (access and ASP).
Base Query :
tSql = "SELECT sectionID, detailSectionID, banID, judgeID, raceID, sectionURL, nbrIns, nbrExp FROM tblDetailSections WHERE detailExpoID = 111
Set Res = dbLink.Execute(tSql)
Other queries related to the Base query :
tSql = "SELECT sectionID, nomSection FROM tblSections WHERE sectionID = " & Res("sectionID")
Set ResNom = dbLink.Execute(tSql)
tSql = "SELECT judgeID, nameJudge, city FROM tblJudges WHERE judgeID = " & Res("judgeID")
Set ResJuge = dbLink.Execute(tSql)
tSql = "SELECT banID, banUrl, banPath FROM tblBans WHERE banID = " & Res("banID")
Set resBan = dbLink.Execute(tSql)
tSql = "SELECT raceID, descRace FROM tblRaces WHERE raceID = " & Res("raceID")
Set resRace = dbLink.Execute(tSql)
How can I put everything together instead of having 5 different queries?
Thank you
w11z