I have done a search for Trigger questions an answers and there are lots... but I just can not get it working.
I have a simple table with 3 fields:
ID(autonumber);Value1;Value2
I want Value2 to always be 100 higher than Value1.
So :
CREATE TRIGGER ValueTwo ON testTrigger
FOR INSERT
AS
UPDATE testTrigger
SET Value2 = Value1 + 100
WHERE ID in (Select ID from inserted)
But When I run this and insert a value, it updates ALL Value2's to be 100 + (my new Value1)
Where am I going wrong?
Thanks,
DerickD
I have a simple table with 3 fields:
ID(autonumber);Value1;Value2
I want Value2 to always be 100 higher than Value1.
So :
CREATE TRIGGER ValueTwo ON testTrigger
FOR INSERT
AS
UPDATE testTrigger
SET Value2 = Value1 + 100
WHERE ID in (Select ID from inserted)
But When I run this and insert a value, it updates ALL Value2's to be 100 + (my new Value1)
Where am I going wrong?
Thanks,
DerickD