strSQL = "SELECT aID FROM tblA " & _
"WHERE aType = '" & Request.Form("aType") & "' " & _
" and not exists " & _
"(select * from tblB where tblb.bid = tablA.aid)"
Frågan#1
Hej,
Jag försöker ta reda på om det finns poster från tabell "A" som inte har någon relation till tabell "B"
Har provat med denna men det verkar inte funka då jag får fram poster fast jag inte borde det? Kan man inte skriva "ON tblA.aID <> tblB.bID" istället för "ON tblA.aID = tblB.bID"?
strSQL = "SELECT aID FROM tblA INNER JOIN tblB ON tblA.aID \<\> tblB.bID WHERE tblA.aType = '" & Request.Form("aType") & "' "
Set objRS = Conn.Execute(strSQL)
Mvh,
Jimpa