Select @var1 =Col1, @var2 =Col2, @var3 = Col3
From mytable
Where ....
For the Cursor:
declare MyCURSOR cursor
for Select Col1, Col2, Col3
from mytable
open MyCursor
set nocount on
fetch next from MyCursor into
@var1, @var2, @var3
while @@fetch_status = 0
begin
Do Somthing
fetch next from MyCursor into
@var1, @var2, @var3
end
close MyCursor
deallocate MyCursor
Good Luck!
Edited by - EPol29 on 04/12/2002 07:45:04 AM