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.