Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
I was wondering if anyone had suggestions as to how to disable a trigger during a time frame - like between 8:00pm - 10:00pm of the current day?
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts
Posted - 2004-10-13 : 10:34:31
do you have to disable it? could you nullify iti.e.
if (getdate() not between dateadd(hh,20,convert(varchar,getdate(),101)) and dateadd(hh,22,convert(varchar,getdate(),101)))Begin --Do somethingEnd
Corey
Girlnet
Yak Posting Veteran
77 Posts
Posted - 2004-10-13 : 11:10:46
Thanks, I'll give that a try. Looks promising.Corey - awesome web site. Love what you've done. As a ASP coder myself, I can appreciate the work.
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts
Posted - 2004-10-13 : 14:38:42
quote:Originally posted by Girlnet Thanks, I'll give that a try. Looks promising.Corey - awesome web site. Love what you've done. As a ASP coder myself, I can appreciate the work.