поэтому просто поправил "ошибки" оптом
выполнять по частям по порядку: в SQL редакторе и редакторе скриптов:
commit ручкими после каждой операции
Код: Выделить всё
-- операции для уведомления на уточнение (выбытие)
update buh_journal bj
set bj.buhoperationcls=602
where bj.progindex = 312
-- операции для уведомления на уточнение (проступление)
update buh_journal bj
set bj.buhoperationcls=699
where bj.progindex = 313
--------------в редакторе скриптов------------------------
SET TERM ^ ;
create PROCEDURE AAA
AS
DECLARE VARIABLE ID_RECORD INTEGER;
begin
for
select bj.sourcerecordindex
from buh_journal bj
where bj.progindex in (312,313)
union
select bj.destrecordindex
from buh_journal bj
where bj.progindex in (312,313)
into :ID_RECORD
do begin
update facialfindetail ffd
set ffd.buhoperationcls=99999
where ffd.id=:ID_RECORD;
update incomes32 i32
set i32.buhoperationcls=99999
where i32.id=:ID_RECORD;
end
suspend;
/* Procedure Text */
end
^
SET TERM ; ^
-------------------------------------
--
execute procedure aaa
--
drop procedure aaa