SELECT definition FROM sys.sql_modules WHERE object_id = OBJECT_ID('dbo.uspGetBillOfMaterials')