SET TERM !! ;
EXECUTE BLOCK AS BEGIN
if (not exists(select 1 from rdb$indices where rdb$index_name = 'IDX_WGHCONTOSTOPRODITTE2')) then 
execute statement 'CREATE INDEX IDX_WGHCONTOSTOPRODITTE2 ON WGHCONTOSTO  (ID_DITTAPREN);';
END!!
SET TERM ; !!

SET TERM !! ;
EXECUTE BLOCK AS BEGIN
if (not exists(select 1 from rdb$indices where rdb$index_name = 'IDX_WGHCONTOSTOPRODDITTE')) then 
execute statement 'CREATE INDEX IDX_WGHCONTOSTOPRODDITTE ON WGHCONTOSTO  (CODDITTA);';
END!!
SET TERM ; !!

SET TERM !! ;
EXECUTE BLOCK AS BEGIN
if (not exists(select 1 from rdb$indices where rdb$index_name = 'IDX_WGHADDSTOPRODDITTE')) then 
execute statement 'CREATE INDEX IDX_WGHADDSTOPRODDITTE ON WGHADDSTO  (CODCONTO);';
END!!
SET TERM ; !!

