Monday, March 26, 2012

executing a trigger

HI all,
is the only or perhaps the best way of executing a tables trigger via
another trigger or SP by actually updating said table
I have a calulation in table a update trigger. It is based on related values
in table b But if those value in table b are change, table a's values need
to be recalculated.
Am I on the right track, or is there a betterway of doing this.
Thanks
RobertIf you don=B4r have control about the process changing the first table,
thats the only way. If yxou have the chance to control the process, the
logic and the statements fired, just add another statement which does
the update of the second table within the same transaction.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||Robert
In that case you need to use a trigger .Create a trigger on table b and
check if the data has changed run a calculation on table Actually if you'd
post samle data and an expected result we'd suggest may be a better solution
"Robert Bravery" <me@.u.com> wrote in message
news:eMqdx6aSGHA.5036@.TK2MSFTNGP12.phx.gbl...
> HI all,
> is the only or perhaps the best way of executing a tables trigger via
> another trigger or SP by actually updating said table
> I have a calulation in table a update trigger. It is based on related
> values
> in table b But if those value in table b are change, table a's values need
> to be recalculated.
> Am I on the right track, or is there a betterway of doing this.
> Thanks
> Robert
>|||HI,
Thanks to all,
Uri, I'm still in design phase with this one. trtying to cover all my bases.
Robert
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:OLS2eGbSGHA.5108@.TK2MSFTNGP11.phx.gbl...
> Robert
> In that case you need to use a trigger .Create a trigger on table b and
> check if the data has changed run a calculation on table Actually if
you'd
> post samle data and an expected result we'd suggest may be a better
solution
>
>
> "Robert Bravery" <me@.u.com> wrote in message
> news:eMqdx6aSGHA.5036@.TK2MSFTNGP12.phx.gbl...
need
>

No comments:

Post a Comment