J
jackjumper
I'd like to do a select with a join using three tables, but I can't seem to
do it. The query I'm trying to do should be something like:
SELECT a.task_id, a.task_start_date, a.task_finish_date, a.task_name,
a.task_pct_comp, a.task_is_summary, b.res_name
FROM msp_tasks a, msp_resources b msp_assignments c
WHERE a.task_name <> ''
AND a.task_uid = c.task_uid (+)
AND b.res_uid = c.res_uid
ORDER BY a.task_start_date;
However access doesn't seem to support the (+) syntax. So I poked around
and found this article:
http://office.microsoft.com/en-us/assistance/HA010345551033.aspx
Which suggests I might do something like:
SELECT a.task_id, a.task_start_date, a.task_finish_date, a.task_name,
a.task_pct_comp, a.task_is_summary, b.res_name
FROM msp_tasks a, msp_resources b LEFT JOIN msp_assignments c
ON a.task_uid = c.task_uid
WHERE a.task_name <> ''
AND b.res_uid = c.res_uid
ORDER BY a.task_start_date;
but I get syntax errors. What I'd like to do is to select what I've got
here (this is from a Microsoft Project database) but I want to include rows
in msp_tasks where no resource is specified (i.e. summary tasks). It appears
that I can't use the third table in the join.
Any help would be appreciated
Tom
do it. The query I'm trying to do should be something like:
SELECT a.task_id, a.task_start_date, a.task_finish_date, a.task_name,
a.task_pct_comp, a.task_is_summary, b.res_name
FROM msp_tasks a, msp_resources b msp_assignments c
WHERE a.task_name <> ''
AND a.task_uid = c.task_uid (+)
AND b.res_uid = c.res_uid
ORDER BY a.task_start_date;
However access doesn't seem to support the (+) syntax. So I poked around
and found this article:
http://office.microsoft.com/en-us/assistance/HA010345551033.aspx
Which suggests I might do something like:
SELECT a.task_id, a.task_start_date, a.task_finish_date, a.task_name,
a.task_pct_comp, a.task_is_summary, b.res_name
FROM msp_tasks a, msp_resources b LEFT JOIN msp_assignments c
ON a.task_uid = c.task_uid
WHERE a.task_name <> ''
AND b.res_uid = c.res_uid
ORDER BY a.task_start_date;
but I get syntax errors. What I'd like to do is to select what I've got
here (this is from a Microsoft Project database) but I want to include rows
in msp_tasks where no resource is specified (i.e. summary tasks). It appears
that I can't use the third table in the join.
Any help would be appreciated
Tom