Hi all,
Is it possible to create Dynamic temporary table in pl/sql .
using cursor to stores values.
my code works for static table ., very well
but my need is in Dynamic table to store the values and fetch
that values in cursor and insert into another tables.
is it possible ??
=========
DELIMITER $$
CREATE PROCEDURE “testproc”()
BEGIN
declare abc varchar(50);
declare SSS cursor for
select id from
[ DYNAMIC_TEMP_TABLE ] where number = 11;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET l_last_row_fetched=1;
SET l_last_row_fetched=0;
open SSS;
SSS_loop: LOOP
fetch SSS into abc;
IF l_last_row_fetched=1 THEN
LEAVE f_loop;
END IF;
insert into newtable (id) values ([values stored in abc]);
any ideas or assist to create dynamic table in pl/sql
OS : windows 2000
DB : MySQL 5.0