Using the EXECUTE IMMEDIATE command directly in Reports is not possible, but you can work around this by creating a stored procedure in the database and then using this procedure in Reports.
The database stored procedure can be created as follows:
CREATE OR REPLACE PROCEDUREDYNA MIC_SQL(STMNT char ) IS
begin
BEGIN
EXECUTE IMMEDI ATE stmnt;
exception
when others then
dbms_output.put_line ('hello');
end;
end;
Now, this procedure can be called in Reports.
For example:
In the BeforeParam Trigger, the Procedure can be called as:
DYNAMIC_SQL('drop table TEST');
This will drop the table 'TEST' from the database.
The database stored procedure can be created as follows:
CREATE OR REPLACE PROCEDURE
begin
BEGIN
EXECUTE IM
exception
when others then
dbms_output.put_
end;
end;
Now, this procedure can be called in Reports.
For example:
In the BeforeParam Trigger, the Procedure can be called as:
DYNAMIC_SQL('drop table TEST');
This will drop the table 'TEST' from the database.