Hi!
I have a trigger for insert where I want to change one of the values that are inserted. The value is a datetime which I want to withdraw one day from. I will do that by:
SELECT @TempVal = (SELECT @Val FROM INSERTED)
SELECT @NewVal = DATEADD(day, -1, @TempVal)
But how do I finish the insert that started the trigger?
Do I write a new separate insert in the trigger to insert the new post or do I modify the original post before complition of the insert?
Anyone who can help me?
Regards David
I have a trigger for insert where I want to change one of the values that are inserted. The value is a datetime which I want to withdraw one day from. I will do that by:
SELECT @TempVal = (SELECT @Val FROM INSERTED)
SELECT @NewVal = DATEADD(day, -1, @TempVal)
But how do I finish the insert that started the trigger?
Do I write a new separate insert in the trigger to insert the new post or do I modify the original post before complition of the insert?
Anyone who can help me?
Regards David