What is Nostr?
mullvad /
npub1xxm…0u7s
2023-12-15 16:20:38

mullvad on Nostr: Anyone familiar with triggers? I get a syntax error and im not sure what is wrong on ...

Anyone familiar with triggers? I get a syntax error and im not sure what is wrong on line 2. First time creating a trigger.

CREATE TRIGGER trig_check_geometry
ON pipeline.tek_water_area AFTER INSERT, UPDATE
AS
BEGIN
IF EXISTS (
SELECT *
FROM inserted
WHERE geometry_column.STIsValid() = 0
)
BEGIN
RAISERROR ('Invalid geometry detected. Please insert valid geometries only.', 16, 1);
ROLLBACK TRANSACTION;
END
END

Author Public Key
npub1xxmkdm3qzxvy6g06ghnlncsywlrh2u004fa7rvry0haunyw3c2vsqq0u7s