Re: Dynamic SQL in Stored procudures
There's no "EXEC" of a string currently (there might be in the future though).
But it's possible to work around with prepared statements:
delimiter //;
create procedure tst()
begin
prepare stmp from 'INSERT INTO LOGG SELECT PFILE_Filename FROM PFILE_FILE';
execute stmp;
deallocate prepare stmp;
end//
delimiter ;//
But beware, prepared statement handles are session global, so it must be used with some care.
Subject
Written By
Posted
November 08, 2004 01:48PM
November 08, 2004 01:57PM
Re: Dynamic SQL in Stored procudures
November 18, 2004 10:56AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.