+ 1
[Closed] Calculate Column value from other table without Primary Key/Unique
I have two tables: One with the names, ID etc. from the users called USERS. The other one contains only times for every user (columns: ID (primary key, foreign key) MONDAY, TUESDAY and TIME_WEEK). TIME_WEEK is calculated with summing MONDAY and TUESDAY. My problem is that I want to save the TIME_WEEK from the second table also in the first table. But I can't make TIME_WEEK unique or a primary key because several users could have the same time. How can I get the value from the second table and save it in the first table? Thanks in advance!
3 ответов
+ 2
Of course I've also Wednesday and so on. I think I don't need the whole working time alsolutely in the first table... Thank you anyway
+ 1
Are MONDAY, TUESDAY and TIME_WEEK storing work hours? but then why name it TIME_WEEK when it only record two days work hours (monday and tuesday).
Also I don't understand the need for this TIME_WEEK field in the first table 'USERS'.
Can you elaborate some more on what you are trying to achieve by these data?. Hope you may gain better response given more details included 👍
0
If this case is solved you may close the question by editing your title like so;
"[CLOSED] Calculate Column value from other table without Primary Key/Unique"
That way other people will be informed thus will not post an answer.
(Edit)
Thank you for updating the post Sebastian 👍