I have these tables and relevant fields:
Table: years
Fields: yearID (pk, unique), Year
Table: standardbuild
Fields: StandardBuildNum (pk, unique), yearID, modelID, rangeID, chassisID, typeID
Table: builds
Fields: BuildNum (pk, unique), CustomerID, StandardBuildNum
the relationships are:
years ------------ standardbuild ----------------- builds
one many one many
I amtrying to use the following query:
SELECT years.year
FROM years INNER JOIN (standardbuild INNER JOIN builds ON standardbuild.standardbuildnum = builds.standardbuildnum) ON years.yearID = standardbuild.yearID
WHERE (((builds.buildnum)="8888"));
but i am getting the following error when putting it into the query analyzer:
You have an error in your SQL syntax near '(standardbuild INNER JOIN builds ON standardbuild.standardbuildnum = builds.stan' at line 2
i am using mySQL
any help will be appreciated
thanx in advance