Hi, I'm trying to create a datagrid that has 3 different Foreign Key Constraints that feed the 3 different dropdownlists. Everything works except the INNER JOIN statement:
Dim strSQL as String = "SELECT dtlID, dtlRprtID, dtlDate, dtlDest, dtlBrkFast, dtlLunch, dtlDinner," & _
" dtlLodging, t.hotelID, h.hotelName, dtlOtherHotel, dtlAir, t.airID, a.airName, dtlOtherAir," & _
" dtlAirTicket, dtlRental, t.rentalID, r.rentalName, dtlOtherRental, dtlPark, dtlPersAuto" & _
" FROM(((tbl_RptDetail t INNER JOIN tblHotel h ON t.hotelID = h.hotelID)" & _
" tbl_rptDetail t INNER JOIN tblAir a ON t.airID = a.airID)" & _
" tbl_RptDetail t INNER JOIN tblRental r ON t.rentalID = r.rentalID)" & _
" Where dtlRprtID =" & lblReport.Text
I keep getting a JOIN syntex error. Any thoughts? SMc
"I have not failed. I just found 10,000 ways that don't work." - Thomas Edison
smcmiata
Participant
998 Points
297 Posts
multiple DDL's in datagrid
Oct 10, 2003 09:46 PM|LINK
Dim strSQL as String = "SELECT dtlID, dtlRprtID, dtlDate, dtlDest, dtlBrkFast, dtlLunch, dtlDinner," & _ " dtlLodging, t.hotelID, h.hotelName, dtlOtherHotel, dtlAir, t.airID, a.airName, dtlOtherAir," & _ " dtlAirTicket, dtlRental, t.rentalID, r.rentalName, dtlOtherRental, dtlPark, dtlPersAuto" & _ " FROM(((tbl_RptDetail t INNER JOIN tblHotel h ON t.hotelID = h.hotelID)" & _ " tbl_rptDetail t INNER JOIN tblAir a ON t.airID = a.airID)" & _ " tbl_RptDetail t INNER JOIN tblRental r ON t.rentalID = r.rentalID)" & _ " Where dtlRprtID =" & lblReport.TextI keep getting a JOIN syntex error. Any thoughts? SMc