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

RECIPE_GET_NAME_SILAGES

 

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

Параметр

Тип

Описание

RECIPEID

INTEGER

 

CLASSID

INTEGER

 

SORTID

INTEGER

 

HARVESTYEAR

INTEGER

 

 

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

Параметр

Тип

Описание

SILAGES

VARCHAR(255)

 

 

Описание

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

 

Определение

CREATE PROCEDURE RECIPE_GET_NAME_SILAGES(
    RECIPEID INTEGER,
    CLASSID INTEGER,
    SORTID INTEGER,
    HARVESTYEAR INTEGER)
RETURNS (
    SILAGES VARCHAR(255))
AS
DECLARE VARIABLE SILAGENAME VARCHAR(15);
begin
  silages = '';
  for
    select silagepacks.name
    from recipesilages
      left join silagepacks on silagepacks.silagepackid = recipesilages.silagepackid
      left join quality_select(recipesilages.qualityid) on 0 = 0
    where recipesilages.recipeid = :recipeid
      and coalesce(quality_select.classid, -1) = coalesce(:classid, -1)
      and quality_select.harvestyear = :harvestyear
      and coalesce(quality_select.sortid, -1) = coalesce(:sortid, -1)
    into :silagename
  do
    if (:silages = '') then silages = :silagename;
    else silages = silages || ',' || :silagename;
  suspend;
end

 

     Previous topic Chapter index Next topic