Входные параметры
Параметр | Тип | Описание |
---|---|---|
ROUTECHEMAID |
INTEGER |
|
SILAGEID |
INTEGER |
|
PERCENTWEIGHT |
INTEGER |
|
Выходные параметры
(Нет выходных параметров)
Описание
(Нет описания для процедуры SAMPLER_EDIT_ROUTESILAGE)
Определение
CREATE PROCEDURE SAMPLER_EDIT_ROUTESILAGE(
ROUTECHEMAID INTEGER,
SILAGEID INTEGER,
PERCENTWEIGHT INTEGER)
AS
begin
if (:percentweight is not null and :percentweight <> 0) then begin
update routesilagechema
set percentweight = :percentweight
where routechemaid = :routechemaid
and silageid = :silageid;
if (row_count = 0) then
insert into routesilagechema(routechemaid, silageid, percentweight)
values (:routechemaid, :silageid, :percentweight);
end
else begin
delete from routesilagechema
where routechemaid = :routechemaid and silageid = :silageid;
end
end