Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
I'm using ADO/MSaccess db.
Is it possible to do an 'INNER JOIN' across more than two tables? As you
might guess, I don't do much SQL so I just can't imagine how I would express
joining in another table/field.
SQL = "SELECT ITEM.[ItemIDnum], ITEM.[ItemName], VENDOR.[VendIDnum],
VENDOR.[Name] " _
& "FROM (VENDOR INNER JOIN LOOKUP ON VENDOR.[VendIDnum] =
LOOKUP.[VendIDnum]) " _
& "INNER JOIN ITEM ON LOOKUP.[ItemIDnum] = ITEM.[ItemIDnum] " _
& "WHERE ITEM.[ItemIDnum] = " & itemID & " " _
& "ORDER BY VENDOR.[Name];"
As you can see I have a number of tables, the three I need/want to join are
VENDOR(the company names etc.)
ITEM(keywords/categories)
COMMS(tel,email,
The above query joins the two tables successfully, however I want to add in
(join in) the COMMS.
Any advice would be most welcome (code to illustrate would be even more
welcome :0)
Best regards
Neil
I'm using ADO/MSaccess db.
Is it possible to do an 'INNER JOIN' across more than two tables? As you
might guess, I don't do much SQL so I just can't imagine how I would express
joining in another table/field.
SQL = "SELECT ITEM.[ItemIDnum], ITEM.[ItemName], VENDOR.[VendIDnum],
VENDOR.[Name] " _
& "FROM (VENDOR INNER JOIN LOOKUP ON VENDOR.[VendIDnum] =
LOOKUP.[VendIDnum]) " _
& "INNER JOIN ITEM ON LOOKUP.[ItemIDnum] = ITEM.[ItemIDnum] " _
& "WHERE ITEM.[ItemIDnum] = " & itemID & " " _
& "ORDER BY VENDOR.[Name];"
As you can see I have a number of tables, the three I need/want to join are
VENDOR(the company names etc.)
ITEM(keywords/categories)
COMMS(tel,email,
The above query joins the two tables successfully, however I want to add in
(join in) the COMMS.
Any advice would be most welcome (code to illustrate would be even more
welcome :0)
Best regards
Neil