Входные параметры
Параметр | Тип | Описание |
---|---|---|
QUALITYID |
INTEGER |
|
Выходные параметры
Параметр | Тип | Описание |
---|---|---|
QUALITYNUMBER |
INTEGER |
|
HUMIDITY |
NUMERIC(9,2) |
|
HARVESTYEAR |
INTEGER |
|
DIRT |
NUMERIC(9,2) |
|
SCREENING |
NUMERIC(9,2) |
|
Описание
(Нет описания для процедуры QUALITYDATA_SELECT_MIN)
Определение
CREATE PROCEDURE QUALITYDATA_SELECT_MIN(
QUALITYID INTEGER)
RETURNS (
QUALITYNUMBER INTEGER,
HUMIDITY NUMERIC(9,2),
HARVESTYEAR INTEGER,
DIRT NUMERIC(9,2),
SCREENING NUMERIC(9,2))
AS
DECLARE VARIABLE QTYPE INTEGER;
DECLARE VARIABLE QVALUE NUMERIC(9,2);
BEGIN
for
select qualitytypeid, qualityvalue
from QualityData
where qualityid = :qualityid and (qualitytypeid in (1, 2, 6, 13, 14))
into :qtype, :qvalue
do begin
if (:qtype = 1) then QUALITYNUMBER = :qvalue;
else if (:qtype = 2) then HUMIDITY = :qvalue;
else if (:qtype = 6) then HARVESTYEAR = cast(:qvalue as integer);
else if (:qtype = 13) then DIRT = :qvalue;
else if (:qtype = 14) then SCREENING = :qvalue;
end
SUSPEND;
END