|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
WITH X(ItemNumber,BuyCode,ItemDesc,DEPTH)
AS
(
SELECT ComponentItemNumber AS ItemNumber,
ComponentMakeBuyCode AS BuyCode,
CAST(ComponentItemNumber AS NVARCHAR(MAX)) AS ItemDesc,1
FROM U_BOM
WHERE ParentItemNumber = 'TA32N1PR-D_B&N'
UNION ALL
SELECT BOM.ComponentItemNumber AS ItemNumber,
BOM.ComponentMakeBuyCode AS BuyCode,
CAST(X.ItemDesc + '-' + BOM.ComponentItemNumber AS NVARCHAR(MAX)) AS ItemDesc,
X.DEPTH + 1
FROM U_BOM BOM,X
WHERE BOM.ParentItemNumber = X.ItemNumber
)
SELECT ItemNumber,ItemDesc,DEPTH
FROM X
ORDER BY DEPTH
U_BOM是FSE_BillOfMaterial 与FSE_ITEM关联的视图 |
|