Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

INNER JOIN WITH 3 TABLES

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rdemyan - 29 Jul 2006 02:25 GMT
I'm trying to create an SQL Statement in code:

So far I have the following:

SELECT A.MASTER_PROJECT_ID, B.SITE
FROM [MASTER_TABLE] AS A, INNER JOIN [CONSTRUCTION_TABLE] AS B
ON A.MASTER_PROJECT_ID = B.PROJECT_ID OR A.SUB_PROJECT_ID = B.PROJECT_ID
WHERE SITE IN ('BOSTON')

This works fine and produces the expected results.

However, now I would like to add a third table that provides the PROJECT_NAME
to match up with the selected MASTER_PROJECT.  As you might expect
MASTER_PROJECT is a number which is meaningless to most people. PROJECT_NAME
is a short description of the project.

I can't seem to get this to work.  

The table name that contains PROJECT_NAME is [PROJECT_TABLE] As C and the key
for this table is PROJECT_ID.  So something where C.PROJECT_ID  = A.
MASTER_PROJECT_ID.

Thanks for any help.
rdemyan - 29 Jul 2006 02:29 GMT
It looks like I have a comma where it shouldn't be.  Second line should be:

FROM [MASTER_TABLE] AS A INNER JOIN [CONSTRUCTION_TABLE] AS B

>I'm trying to create an SQL Statement in code:
>
[quoted text clipped - 19 lines]
>
>Thanks for any help.
rdemyan - 29 Jul 2006 19:44 GMT
No need to respond.  I gave up and essentially used a couple of queries to
accomplish the task.

>It looks like I have a comma where it shouldn't be.  Second line should be:
>
[quoted text clipped - 5 lines]
>>
>>Thanks for any help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.