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

FORWARDER_SILAGENAMES

 

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

Параметр

Тип

Описание

EXPORTACTID

INTEGER

 

 

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

Параметр

Тип

Описание

SILAGENAMES

VARCHAR(256)

 

BINNAMES

VARCHAR(100)

 

 

Описание

(Нет описания для процедуры FORWARDER_SILAGENAMES)

 

Определение

CREATE PROCEDURE FORWARDER_SILAGENAMES(
    EXPORTACTID INTEGER)
RETURNS (
    SILAGENAMES VARCHAR(256),
    BINNAMES VARCHAR(100))
AS
DECLARE VARIABLE TMP_BINNAME VARCHAR(30);
DECLARE VARIABLE TMP_SILAGENAME VARCHAR(30);
BEGIN /*$$IBE$$ 
  SilageNames = null;
  FOR
    select distinct
      Silage.Name as SilageNumber
    from ExportActItems EAI
      left join IT on (EAI.InventoryID = IT.InventoryID)
      left join Silage on (IT.RouteID = Silage.SilageID)
      -- для ларей
    where EAI.ExportActID = :ExportActID
      and EAI.OperationID = 5
      and EAI.weight > 0
    INTO :TMP_SilageName
  DO
  BEGIN
    if (:SilageNames is null) then
       SilageNames = coalesce(:TMP_SilageName,'');
     else
       SilageNames = coalesce(SilageNames,'') ||'; '|| TMP_SilageName;
    SUSPEND;
  END
 $$IBE$$*/ EXIT;
END

 

     Previous topic Chapter index Next topic