Inner join help

  • Thread starter Thread starter James Gralton
  • Start date Start date
J

James Gralton

Hi,

I have the following SQL statment and am trying to create an inner join
accross 3 tables. Can anyone let me know what I am doing wrong as I am
getting a You have an error in your SQL syntax error.

Thank you

James Gralton

SELECT
Model.ShortNameDescription,ExtendedBN.ShortNameDescription,ExtendedNode.ShortNameDescription
FROM Model
INNER JOIN ExtendedBN ON Model.ModelID=ExtendedBN.ConnModelID
INNER JOIN ExtendedNode ON
ExtendedBN.ExtendedBNID=ExtendedNode.ConnExtendedBNID;
 
Try thi
SELECT Model.ShortDescription, ExtendedNode.ShortNameDescription, ExtendedBN.ShortNameDescriptio
FROM (Model INNER JOIN ExtendedNode ON Model.ModelID = ExtendedNode.ConnExtendedBNID) INNER JOIN ExtendedBN ON ExtendedNode.ConnExtendedBNID = ExtendedBN.ExtendedBNID


----- James Gralton wrote: ----

Hi

I have the following SQL statment and am trying to create an inner join
accross 3 tables. Can anyone let me know what I am doing wrong as I am
getting a You have an error in your SQL syntax error

Thank yo

James Gralto

SELECT
Model.ShortNameDescription,ExtendedBN.ShortNameDescription,ExtendedNode.ShortNameDescriptio
FROM Mode
INNER JOIN ExtendedBN ON Model.ModelID=ExtendedBN.ConnModelI
INNER JOIN ExtendedNode ON
ExtendedBN.ExtendedBNID=ExtendedNode.ConnExtendedBNID
 
Hi,

I have the following SQL statment and am trying to create an inner join
accross 3 tables. Can anyone let me know what I am doing wrong as I am
getting a You have an error in your SQL syntax error.

Access is really picky about parentheses. Try either building the
query in the query grid (just to see how Access does it) or enclosing
the first join in parens:

SELECT
Model.ShortNameDescription,ExtendedBN.ShortNameDescription,ExtendedNode.ShortNameDescription
FROM (Model
INNER JOIN ExtendedBN ON Model.ModelID=ExtendedBN.ConnModelID)
INNER JOIN ExtendedNode ON
ExtendedBN.ExtendedBNID=ExtendedNode.ConnExtendedBNID;
 
Back
Top