I’m trying to write an SQL Trigger with the following approximate form:
CREATE TRIGGER TableABSync ON TableA
FOR INSERT AS
INSERT INTO TableB
(col1, col2, col3, col4)
SELECT
PK_ColA, ColB, ColC - ColD, ColE * TableB.Col3
FROM inserted
So I’d like to use the newly generated Col3 to calculate Col4. Will I have to do this in stages?
Cheers
Why dont you directly use something like :