Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
Thread: A multiple query
01-06-2012, 08:56 PM #1
A multiple query
Once again, I've gotten stumped on a complex query. Basically, we have a DB with 3 tables. Here is the query structure:
rs.open "Select TESTB.Contents From TESTA inner Join TESTC On (TESTC.OrderID = TESTA.IndexID) inner Join testb On (testb.indexid = TESTC.Ex_usoID) Where testa.word like '%"&StrKeyword&"%' ", conn
Syntax error (missing operator) in query expression '(TESTEC.OrderID = TESTEA.IndexID) inner Join testeb On (testeb.indexid = TESTEC.Ex_usoID)'.
Thanks for any help you can provide
01-06-2012, 09:01 PM #2
The error message does not match the query you showed.
The error message saysCode:
(TESTEC.OrderID = TESTEA.IndexID)Code:
(TESTC.OrderID = TESTA.IndexID)Be yourself. No one else is as qualified.
01-06-2012, 10:41 PM #3
The problem iis not with the spelling words (I have corrected), but the ordem of the fields and comands. I think.
01-06-2012, 11:01 PM #4
This is an Access DB, yes?
Try taking the query and running in Access, not from ASP. Sometimes you will get better error diagnostics in Access.
You could also try this with IMPLICIT joins:
SQL = "Select TESTB.Contents " _ & " From TESTA, TESTC, TESTB " _ & " Where TESTC.OrderID = TESTA.IndexID " _ & " And testb.indexid = TESTC.Ex_usoID " _ & " And testa.word like '%" & StrKeyword & "%' " rs.Open SQL, connBe yourself. No one else is as qualified.