Fetch the Next row in order to preceed the loop.
declare @toupdate cursor for
select
empcode,fscode,fsname,type,parentcode,area,
areacode,parenttype,grade,qual,add1,add2,add3,add4
,pin,phone,email,div
,newcode,todes from r
open @toupdate
fetch next from @toupdate into
@emp,@oldfscode,@newfsname,@fstype,@parentcode,@areaname,@areacode,
@parentype,@grade,@qual,@add1,@add2,@add3,@add4,@pin,@phone,@email,
@div,@newcode,@desg
while @@FETCH_STATUS=0
begin
fetch next from @toupdate into
@emp,@oldfscode,@newfsname,@fstype,@parentcode,@areaname,@areacode,
@parentype,@grade,@qual,@add1,@add2,@add3,@add4,@pin,@phone,@email,
@div,@newcode,@desg
end
close @toupdate
deallocate @toupdate