Subject Firebird script not work. Need help.
Author Steve
{begin code}

set term ^;

execute block
as

declare variable trig char(31);
declare variable genr char(31);
declare variable reln char(31);

begin

-- all triggers
for
select rdb$trigger_name from rdb$triggers
where rdb$system_flag = 0 into :trig
do
begin
execute statement 'alter trigger ' || :trig || ' inactive' ;
suspend;
end

-- all generators
for
select rdb$generator_name
from rdb$generators
where rdb$system_flag = 0 into :genr
do
begin
execute statement 'set generator ' || :genr || ' to 0';
suspend;
end

-- all tables
for
select rdb$relation_name from rdb$relations
where (rdb$system_flag = 0) and (rdb$view_blr is null)
and (rdb$relation_name not in ('tblyesno',
'tblpaymentmethod',
'tblresourcetype'))
into :reln
do
begin
execute statement 'delete from ' || :reln;
suspend;
end

end^

set term ;^

{end code}


After running the above script, tables still have data, triggers are still active and generators are not reset.

I am on Firebird 2.5/SuperServer and am running the script in Database Workbench.

Can anyone help out?



--
Regards,
Steve Faleiro