Join from Microsoft Project data

J

jackjumper

I'm trying to build a query for showing a table of tasks and summary tasks
from an access databased saved by Microsoft Project. I have three tables of
interest:

msp_tasks - a list of tasks in the project, including
task_uid - unique task ID
task_name - name of the task
task_is_summary - whether the task is a summary task or not

msp_resources - a list of available resources (i.e. people)
res_uid - unique resource id
res_name - name of resource

and

msp_assignments - a list of task assigments
task_uid - task id from msp_tasks
res_uid - resource id from msp_resources

What I'd like to do is do a select where I get all the task names and people
assigned to them, but also the summary task names, which have no resource
assignment.

I've tried this:

SELECT DISTINCTROW A.task_uid, a.task_name, a.task_is_summary, B.res_name
FROM msp_tasks AS A, msp_resources AS B, msp_assignments AS C
WHERE (a.task_is_summary = -1) Or (a.task_uid=c.task_uid And
b.res_uid=c.res_uid);

But I get each summary task multiple times (once for each possible
resource). I only want each summary task to appear in the table once. How
would I do this?

Thanks in advance

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top