|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Dynamic statemant and Fetch cursor
From: Dusan Kolesar (dusankolesar
szm.sk)
Date: Thu Jun 24 2004 - 09:07:18 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 : dusankolesar
szm.sk
ICQ# : 160507424
-=x=-
Skontrolované antivírovým programom NOD32
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]