"localhost:/firebird/data/ILICHEVSK2.FDB". �������� Previous topic Chapter index Next topic

RECIPESILAGES_SetSortIndex

 

��������

(��� �������� ��� �������� RECIPESILAGES_SetSortIndex)

 

�����������

CREATE TRIGGER "RECIPESILAGES_SetSortIndex" FOR RECIPESILAGES
ACTIVE BEFORE INSERT POSITION 0
AS
declare variable ASortIndex Integer;
begin
  select coalesce(max(SortIndex), 0) + 1
  from RECIPESILAGES
  where RECIPESILAGES.recipeid = new.recipeid
  into :ASortIndex;
  new.sortindex = :ASortIndex;
end

 

     Previous topic Chapter index Next topic