Question: Execute a query to check if a corresponding record has been inserted into the [Sales].[OrderAudit] table. The AuditTimestamp in [Sales].[OrderAudit] should be the current date

Execute a query to check if a corresponding record has been inserted into the [Sales].[OrderAudit] table.

The AuditTimestamp in [Sales].[OrderAudit] should be the current date and time.

OrderDetails (Sales) orderid productid unitprice qty discount Products (Production) productid productname

OrderDetails (Sales) orderid productid unitprice qty discount Products (Production) productid productname supplierid categoryid unitprice discontinued Categories (Production) categoryid categoryname description Suppliers (Production) supplierid companyname contactname contacttitle address city region postalcode country phone fax Cu Employees (HR) empid lastname firstname title titleofcourtesy birthdate hiredatel address city region postalcode country phone mgrid 8 Orders (Sales) orderid custid empid orderdate requireddate shippeddate shipperid freight shipname shipaddress shipcity shipregion shippostalcode shipcountry Customers (Sales) custid companyname contactname contacttitle address city region postalcode country phone fax Shippers (Sales) shipperid companyname phone OrderDetails (Sales) orderid productid unitprice qty discount Products (Production) productid productname supplierid categoryid unitprice discontinued Categories (Production) categoryid categoryname description Suppliers (Production) supplierid companyname contactname contacttitle address city region postalcode country phone fax Cu Employees (HR) empid lastname firstname title titleofcourtesy birthdate hiredatel address city region postalcode country phone mgrid 8 Orders (Sales) orderid custid empid orderdate requireddate shippeddate shipperid freight shipname shipaddress shipcity shipregion shippostalcode shipcountry Customers (Sales) custid companyname contactname contacttitle address city region postalcode country phone fax Shippers (Sales) shipperid companyname phone

Step by Step Solution

3.26 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here are the SQL scripts for each of the tasks youve described Task 1 Create OrderAudit Table and Trigger 1 Create the SalesOrderAudit table CREATE TABLE SalesOrderAudit AuditID int IDENTITY1 1 PRIMAR... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!