"localhost:/firebird/data/ILICHEVSK2.FDB". Процедуры Previous topic Chapter index Next topic

UPDATE_AND_DELETE

 

Входные параметры

Параметр

Тип

Описание

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

 

     Previous topic Chapter index Next topic