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

Update statement is no query?

How do I define the update statement in the orm.xml. I have it as a named-query and everything works, but my teacher said that an update statement isn’t a query. I have tried a native query, but that wasn’t working. ORM-Type: <?xml version="1.0" encoding="UTF-8"?> <entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"> Update Statement: <named-query name="updateTshirts"> <query>… Read More Update statement is no query?