Mark1M
asked on
Setting a field value when multiple records exist
Hi Everyone,
I have a question on how to set a field value in multiple records where there is a specific key, when a condition is meet within multiple records.
I have a table 'A', it contains 4 fields:
TEAM_NAME
PLAYER_NAME
PLAYER_STATUS
TEAM_STATUS
I will have multiple records with the same TEAM_NAME(key). I want to set the TEAM_STATUS to 'Y' in each team record, only when ALL of the individual PLAYER_STATUS for that team is 'Y'.
Thanks in advance.
Mark
I have a question on how to set a field value in multiple records where there is a specific key, when a condition is meet within multiple records.
I have a table 'A', it contains 4 fields:
TEAM_NAME
PLAYER_NAME
PLAYER_STATUS
TEAM_STATUS
I will have multiple records with the same TEAM_NAME(key). I want to set the TEAM_STATUS to 'Y' in each team record, only when ALL of the individual PLAYER_STATUS for that team is 'Y'.
Thanks in advance.
Mark
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
momi_sabag's answer is appropriate for your current table definition, but generally speaking your data model does not seem adequate for the requirements. You clearly have two entities: team and player, which asks for at least two separate tables.
ASKER
momi_sabag & mustaccio,
Thank you very much for your responses.
Thank you very much for your responses.