I have the following update query in SQL
update dbo.core
set birthyr = Year(BirthD),
brthmn = Month(BirthD),
brthdy = Day(BirthD)
Now my boss wants me to turn off triggers while this update query is excecuting then turn it back on. I have not used triggers prevously but I want to knwo if someone could review my code I am trying to keep this as simple as possible:
alter table core disable trigger all
update dbo.core
set birthyr = Year(BirthD),
brthmn = Month(BirthD),
brthdy = Day(BirthD)
alter table enable trigger all
My feeling is that it is not that simple and that I may need to see if there is a template in enterprise manager to handle this and perhaps assist me with some coding.
update dbo.core
set birthyr = Year(BirthD),
brthmn = Month(BirthD),
brthdy = Day(BirthD)
Now my boss wants me to turn off triggers while this update query is excecuting then turn it back on. I have not used triggers prevously but I want to knwo if someone could review my code I am trying to keep this as simple as possible:
alter table core disable trigger all
update dbo.core
set birthyr = Year(BirthD),
brthmn = Month(BirthD),
brthdy = Day(BirthD)
alter table enable trigger all
My feeling is that it is not that simple and that I may need to see if there is a template in enterprise manager to handle this and perhaps assist me with some coding.