Triggers SQL 2005 Adventure Works OLTP

Purchasing.uPurchaseOrderDetail

Object type: Trigger

AFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in PurchaseOrderDetail and updates the PurchaseOrderHeader.SubTotal column.

Summary 

On table:  Delete  Update  Insert  Type 
Purchasing.PurchaseOrderDetail  No Yes Yes After 

Properties 

Modifies data  Transactional  Uses cursors  Executes procedures  Dynamic content  Encrypted 
Yes Yes No No No No

Data Source Activity 

Modifications  Description 
Production.TransactionHistory  Record of each purchase order, sales order, or work order transaction year to date. 
Purchasing.PurchaseOrderDetail  Individual products associated with a specific purchase order. See PurchaseOrderHeader. 
Purchasing.PurchaseOrderHeader  General purchase order information. See PurchaseOrderDetail. 

Accesses  Description 
Purchasing.PurchaseOrderDetail  Individual products associated with a specific purchase order. See PurchaseOrderHeader. 

Applies to

Triggers | Modifies data | Transactional | On update | After table changes
The AdventureWorks database sample was developed by Microsoft Corporation, copyright 2005. SQL Server is a trademark of Microsoft Corporation

Document was prepared on: Thursday, April 05, 2007
Help compiled by DBDocumentor, a Pikauba Software product. All rights reserved.