On Tue, 25 Mar 2008 11:50:49 +0300, Vlad Khorsun <[EMAIL PROTECTED]> wrote:
set term ^ ;
execute block as
declare variable SQLCommand varchar(100);
declare variable idx varchar(32);
begin
for select i.rdb$index_name
from rdb$indices i
where i.rdb$index_inactive = 1 and i.rdb$system_flag is null and
i.rdb$foreign_key is null
union all
select i.rdb$index_name
from rdb$indices i
where i.rdb$index_inactive = 1 and i.rdb$system_flag is null and
i.rdb$foreign_key is not null
into idx
do begin
SQLCommand = 'ALTER INDEX ' || idx || ' ACTIVE;';
suspend;
end
end^
set term ; ^
--
Сергей Смирнов.