Hello,
Is is posible to fetch from dynamic cursor?

I need something like this:
CREATE DBPROC GET_EVENT (IN eventTb Varchar(30)) RETURNS CURSOR AS
  VAR
    stmt Varchar(300);
    id   Integer;
BEGIN
  SET stmt = 'SELECT ID, ''' || eventTb || ''' FROM ADMIN.' || eventTb ||
             ' WHERE ROWNO <= 1';
  EXECUTE stmt;
  FETCH INTO :id;
  INSERT TEST SET ID=:id;
END;
But I get an error : "Unknown result table" on the fetch command.

Don't you know any solution for my problem ?
Thank you for help.             

Regards, Dusan

--
Dusan Kolesar
Helsinska 19
040 13  Kosice
Slovakia
e-mail : [EMAIL PROTECTED]
ICQ# : 160507424

-=x=-
Skontrolované antivírovým programom NOD32


-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to