In this code snippet I am writing trigger to stop transaction on Sunday
Create trigger trgBank
On BankAccount
After Insert, Update, Delete
As
Begin
If datapart(wd, getdate()) = ’Sunday’
Begin
Rollback
Raiseerror(‘Today we are not open‘);
End
EndIn this snippet I am writing trigger to stop transaction on Sunday.
In this code snippet I am writing trigger to stop transaction on Sunday
Create trigger trgBank
On BankAccount
After Insert, Update, Delete
As
Begin
If datapart(wd, getdate()) = ’Sunday’
Begin
Rollback
Raiseerror(‘Today we are not open‘);
End
End