Hi,
I have 3 tables, Person (which holds name of person etc.), Project (which holds name of project etc.) and ProjectMetrics (which holds particular project name and person name and some other data connected with particular person and project). Now I have an append query which appends project name (from project table) and person name (from person table) to the table ProjectMetrics. This query is created to help user assigning people to the projects (so there is a parameter ProjectName so if user want to append people to the project he write the name of that project and Voilą). The problem is user can append particular people to the project with no limit. So for example if user will run this query 3 times there will be:
Code:
Name Project
John Doe Fire
John Doe Fire
John Doe Fire
And I want that John Doe to appear only one time in the project even after running query 3 times. Is there any possibility of doing this? Ah and I would't like to make Name and Project as primary keys in the ProjectMetrics table.
Here the SQL code.
Code:
PARAMETERS ProjectName Text ( 255 );
INSERT INTO [ProjectMetrics] ( Person, Project )
SELECT Person.IdPER, Project.IdPRO
FROM Person, Project
WHERE (((Project.[ProjectName])=[ProjectName]));