Hi people, I thought I had a simple problem ahead of me but it turns out it ain't that simple as I hoped it would be. So here is the problem:
I've got a table in a dataset which acts like a join table to other parent tables making a many to many relation.
Got two foreign keys in it which are related to their master tables, problems is I want to make the combination of the two foreign keys act like an unique entry.
To be more precise, example:
Table1: Employes, which contains every employee
Table2: Months: which contains months of the year like id=number of month name=the name of the month
Table3: the link between the two tables contains keys which relate to the id of the employee and the id of the month, my problem is I wanna restrict user from entering the same employee with the same month, t.i. an employee with id=1 and a month with id=1 can be written in Table3 only once. I thought i had some solution for this but my efforts failed.
Thanks in advance
I've got a table in a dataset which acts like a join table to other parent tables making a many to many relation.
Got two foreign keys in it which are related to their master tables, problems is I want to make the combination of the two foreign keys act like an unique entry.
To be more precise, example:
Table1: Employes, which contains every employee
Table2: Months: which contains months of the year like id=number of month name=the name of the month
Table3: the link between the two tables contains keys which relate to the id of the employee and the id of the month, my problem is I wanna restrict user from entering the same employee with the same month, t.i. an employee with id=1 and a month with id=1 can be written in Table3 only once. I thought i had some solution for this but my efforts failed.
Thanks in advance
Comment