|
 |
asp_databases thread: how do i do a 3-way join in using SQL in ASP!!!
Message #1 by joe.feeney5@v... on Thu, 27 Jul 2000 23:18:24
|
|
I'm trying to do a 3-way table join using SQL and i'm not having much joy,
my selection statement is as follows:
strSQL = "SELECT stmbiogs.surname, stmbiogs.forename, stmbiogs.student_id
FROM stcstatd INNER JOIN stmaos ON stcstatd.aos_code =
stmaos.aos_code
AND stmbiogs INNERJOIN stmaos ON stmbiogs.student_id =
stmaos.student_id
WHERE stcstatd.full_desc = ' " &
Request.Form("ListSelection") & " ' "
I think that my syntax is a bit dodgey, the error message that i get back
is:
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression ''.
/begasp/StudentSelect.asp, line 30
I'd appreciate any help.
Many thanks
Joe
Message #2 by "Imar Spaanjaars" <Imar@C...> on Mon, 31 Jul 2000 13:24:15
|
|
Hi Joe,
There should be a space between the second INNER and the second JOIN.
Imar
On 07/28/00, you wrote:
> I'm trying to do a 3-way table join using SQL and i'm not having much joy,
my selection statement is as follows:
strSQL = "SELECT stmbiogs.surname, stmbiogs.forename, stmbiogs.student_id
FROM stcstatd INNER JOIN stmaos ON stcstatd.aos_code =
stmaos.aos_code
AND stmbiogs INNERJOIN stmaos ON stmbiogs.student_id =
stmaos.student_id
WHERE stcstatd.full_desc = ' " &
Request.Form("ListSelection") & " ' "
I think that my syntax is a bit dodgey, the error message that i get back
is:
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression ''.
/begasp/StudentSelect.asp, line 30
I'd appreciate any help.
Many thanks
Joe
|
|
 |