Error-Raising Procedure and Trigger in MS SQL
I am trying to prevent a user from running DML commands on employees in MS SQL Server in certain period of the the week. What I have been trying is: CREATE OR ALTER PROCEDURE secure_dml AS BEGIN IF CONVERT(VARCHAR(8), GETDATE(), 8) NOT BETWEEN ’08:00:00′ AND ’18:00:00′ OR FORMAT(GETDATE(), ‘ddd’) IN (‘Mon’, ‘Sun’) BEGIN RAISERROR (‘You… Read More Error-Raising Procedure and Trigger in MS SQL