Обсуждение: Stepping through cursors

Поиск
Список
Период
Сортировка

Stepping through cursors

От
"Oleg Lebedev"
Дата:
I opened a cursor and trying to step through it. The problem I came across is how to check whether the end of the cursor have been reached, smth like "if (rec%NOTFOUND)" in Oracle. Any ideas how to do this gracefully without running an sql query to find out the size of the cursor record set?
BTW, is there any other way to step through records returned by a dynamic query. For example, suppose I have a query "select col_name from table_name", where col_name and table_name are passed as a parameter to a procedure. I want to step through the result of this query and put all values in the column in a coma-separated array.
Thanks.
 
Oleg