T
TaeHo Yoo
Have a problem with using cursors in SQL server enterprise manager.
My code sql query is followed
---------------------------------------
DECLARE @element_name varchar(100)
DECLARE elements_cursor CURSOR FOR
SELECT element_name
FROM KB_Element_Ref
OPEN elements_cursor
FETCH NEXT FROM elements_cursor INTO @element_name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT @element_name
FETCH NEXT FROM elements_cursor INTO @element_name
END
CLOSE elements_cursor
DEALLOCATE elements_cursor
My code sql query is followed
---------------------------------------
DECLARE @element_name varchar(100)
DECLARE elements_cursor CURSOR FOR
SELECT element_name
FROM KB_Element_Ref
OPEN elements_cursor
FETCH NEXT FROM elements_cursor INTO @element_name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT @element_name
FETCH NEXT FROM elements_cursor INTO @element_name
END
CLOSE elements_cursor
DEALLOCATE elements_cursor