This?
declare @Sample table (id int, NoOcc int)
insert @Sample(id)
select 1 union all
select 1 union all
select 1 union all
select 2 union all
select 3 union all
select 3
select * from @Sample
update dt
set NoOcc=dt.rownum
from
(select id, NoOcc, row_number() over (partition by id order by id) as rownum from @Sample)dt
select * from @Sample
No, you're never too old to Yak'n'Roll if you're too young to die.