Hey Leo,
Use my coding as following,
Code:
Declare MyCur Cursor
For
Select name,age From emp --- your query here
Open MyCur
Declare @UserName Varchar(50)
Declare @Age int
Fetch Next From Cursor Into @UserName, @Age
While @@Fetch_Status = 0
Begin
Update emp set age = @Age *2 where [name]= @UserName -- do your calculation here
End
Close MyCur
Deallocate MyCur
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!