Stored procedures SQL 2005 Adventure Works OLTP

dbo.uspGetBillOfMaterials

Object type: Stored procedure

Stored procedure using a recursive query to return a multi-level bill of material for the specified ProductID.

Syntax

dbo.uspGetBillOfMaterials ( StartProductID, CheckDate )

Parameters 

Variable  Data Type  Required  Output  Description 
StartProductID  int  Yes No Input parameter for the stored procedure uspGetBillOfMaterials. Enter a valid ProductID from the Production.Product table. 
CheckDate  datetime  Yes No Input parameter for the stored procedure uspGetBillOfMaterials used to eliminate components not used after that date. Enter a valid date. 

Properties 

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

Data Source Activity 

Accesses  Description 
BOM_cte    
Production.BillOfMaterials  Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components. 
Production.Product  Products sold or used in the manfacturing of sold products. 

Output Recordset 

Column  Description 
ProductAssemblyID   
ComponentID   
ComponentDesc   
TotalQuantity   
StandardCost   
ListPrice   
BOMLevel   
RecursionLevel   


Data source  Description 
BOM_cte    

Applies to

Stored procedures | Returns data
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.