Quote:
|
Originally Posted by EFRA
Do I really need to create a temp database in order to declare a dynamic scrollable cursor
|
Are you sure you're using a dynamic scrollable cursor?
(Syntax: DECLARE name SENSITIVE DYNAMIC SCROLL CURSOR FOR query.)
A static scrollable cursor will indeed need a temp table, but since a dynamic cursor is "fully sensitive" it would not make sense to materialize the result set into a temp table: the data has to be accessed directly in order to be sensitive to any changes, including INSERTs.
Actually, you would get an SQLCODE -243 during BIND when your query would need materialization (e.g. because of an ORDER BY without the presence of an appropriate index).