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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Disabling Trigger based on time

Author  Topic 

Girlnet
Yak Posting Veteran

77 Posts

Posted - 2004-10-13 : 10:28:17
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 it

i.e.

if (getdate() not between dateadd(hh,20,convert(varchar,getdate(),101)) and dateadd(hh,22,convert(varchar,getdate(),101)))
Begin
--Do something
End


Corey
Go to Top of Page

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.
Go to Top of Page

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.



Why thank you... good luck with it!

Corey
Go to Top of Page
   

- Advertisement -