DECLARE @Variable VARCHAR(200) DECLARE CURSORNAME CURSOR FOR SELECT ColumnName FROM Table OPEN CURSORNAME FETCH NEXT FROM CURSORNAME INTO @Variable WHILE @@FETCH_STATUS = 0 BEGIN -- DO STUFF HERE !! FETCH NEXT FROM CURSORNAME INTO @Variable END CLOSE CURSORNAME DEALLOCATE CURSORNAME
No comments:
Post a Comment