R
rdemyan via AccessMonster.com
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.
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.