Hi, I'm trying to do something like I do in Oracle:


...
if v_xxx=1 then
open MyCursor for
SELECT A,B,C FROM TABLEX;
else
open MyCursor for
SELECT A,B,C FROM TABLEY;
end if;

fetch MyCursor into v_a, v_b, v_c;
...

Using the same cursor name, and declaring inside of procedure.
thanks.