I want to update the group_cnt column so that it would contain the number of employees in the group. So after the update, the results would look like this:
I've done this type of thing in SQL Server, but the syntax I used doesn't work in Oracle. I'm not sure how to join to the table to update it once I've got my count.
Try this -> Not sure this works
update employee_group a
set a.group_cnt = ( select G_CNT, group_id from (select count(group_cnt) G_CNT, group_id from employee_group
group by group_id ) b
where a.group_id = b.group_id
Bookmarks