Albo...
FETCH NEXT FROM myCursor INTO @ContactName
WHILE @@FETCH_STATUS = 0
BEGIN
-- do stuff
FETCH NEXT FROM myCursor INTO @ContactName
END
Lub...
WHILE @@FETCH_STATUS = 0
BEGIN
FETCH NEXT FROM myCursor INTO @ContactName
IF @@FETCH_STATUS = 0
BEGIN
-- do stuff
END
END
Lub...
WHILE (1 = 1)
BEGIN
FETCH NEXT FROM myCursor INTO @ContactName
IF @@FETCH_STATUS <> 0
BREAK
-- do stuff
END