Dynamics GP BOM Export – Part 10

Dynamics GP BOM Export  – Part 10

USE [COMPANYDB]
go
/****** Object:  View [dbo].[BOM10]    Script Date: 09/04/2013 19:37:00 ******/
SET ansi_nulls ON
go
SET quoted_identifier ON
go
CREATE VIEW [dbo].[BOM10]
AS
SELECT TOP (100) PERCENT dbo.bom9.item0,
dbo.bom9.item1,
dbo.bom9.item2,
dbo.bom9.item3,
dbo.bom9.item4,
dbo.bom9.item5,
dbo.bom9.item6,
dbo.bom9.item7,
dbo.bom9.item8,
dbo.bom9.item9,
dbo.bm010115.cpn_i AS ITEM10,
dbo.bm010115.bomcat_i,
dbo.bm010115.bomname_i,
10                 AS [LEVEL],
dbo.bm010115.effectiveindate_i,
dbo.bm010115.bomtype_i,
dbo.iv00101.stndcost,
dbo.bm010115.backflushitem_i,
dbo.bm010115.locncode,
dbo.bm010115.position_number,
dbo.iv00101.itemdesc,
dbo.bm010115.quantity_i,
dbo.bm010115.uofm,
dbo.bom9.zero,
dbo.bom9.one,
dbo.bom9.two,
dbo.bom9.three,
dbo.bom9.four,
dbo.bom9.five,
dbo.bom9.six,
dbo.bom9.seven,
dbo.bom9.eight,
dbo.bom9.nine,
dbo.bom9.q0,
dbo.bom9.q1,
dbo.bom9.q2,
dbo.bom9.q3,
dbo.bom9.q4,
dbo.bom9.q5,
dbo.bom9.q6,
dbo.bom9.q7,
dbo.bom9.q8,
dbo.bom9.q9
FROM   dbo.bom9
INNER JOIN dbo.bm010115
ON dbo.bom9.bomname_i = dbo.bm010115.bomname_i
AND dbo.bom9.bomcat_i = dbo.bm010115.bomcat_i
AND dbo.bom9.item9 = dbo.bm010115.ppn_i
INNER JOIN dbo.iv00101
ON dbo.bm010115.cpn_i = dbo.iv00101.itemnmbr
ORDER  BY dbo.bm010115.position_number