Home Forums SQL Server 7,2000 General Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32) RE: Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)

  • CAN SOMEONE tell me what is wrong with this code

    I have two tables LicParcela, and LicKo , I want, when i Draw ( insert) new Parcela ( Polygon type), to check in With LiKo (Polygon) is, and to give LicParcela.LicKoId that Id of LicKo

    CREATE TRIGGER ubacujeKoIdZaParcelu

    ON dbo.LicParcela

    AFTER INSERT,UPDATE

    AS

    BEGIN

    DECLARE @C int

    SET @C=(SELECT LicKo.LicKoId FROM LicKo,LicParcela

    WHERE LicKo.geom.STContains(LicParcela.geom)=1

    )

    UPDATE LicParcela

    SET LicParcela.LicKoId=@c

    END

    GO