Входные параметры
Параметр | Тип | Описание |
---|---|---|
SELDATE |
DATE |
|
Выходные параметры
(Нет выходных параметров)
Описание
(Нет описания для процедуры UPDATE_AND_DELETE)
Определение
CREATE PROCEDURE UPDATE_AND_DELETE(
SELDATE DATE)
AS
declare variable invoiceregisterid integer;
BEGIN
FOR
select
InvoiceRegisters.InvoiceRegisterID
from IT
left join InvoiceRegisters on (IT.registerid = InvoiceRegisters.Invoiceregisterid)
where IT.regdate >= :SelDate
and IT.operationid = 1
and not InvoiceRegisters.InvoiceRegisterID is null
and not exists (select ExportActs.registerid
from ExportActs where ExportActs.registerid = IT.registerid )
group by InvoiceRegisters.InvoiceRegisterID
INTO :INVOICEREGISTERID
DO
BEGIN
execute procedure register_to_act(:INVOICEREGISTERID);
END
SUSPEND;
END