Hi,
I have table structure like below
TaskId INT
,ParentId INT FK
,Progress Float
Sample data
TaskId,ParentId,Progress
1,NULL,0
2,1,0
3,2,0
4,2,0
If I update progress for the taskId = 4 then its parent's progress should update for example progress of TaskId=2 and since Parent of TaskId = 2 is 1 then progress of TaskId = 1 should get updated.
I have created a trigger but it only update the progress of TaskId = 2.
How can I achieve it ?