|
5#
楼主 |
发表于 2006-9-11 21:33:00
|
只看该作者
问题
INSERT INTO BOM展开结构临时表 ( BOM等级, 部品长代码, 部品名称, 用量, 一级组件编号, 二级组件编号, 三级组件编号, 四级组件编号 )
SELECT 1 AS BOM部品等级, dbo_t_ICItem.FNumber AS 子部品编号, dbo_t_ICItem.FName AS 子部品名称, dbo_ICBOMChild.FAuxQty AS 用量, dbo_t_ICItem.FNumber AS 排序编号1, dbo_t_ICItem.FNumber AS 排序编号2, dbo_t_ICItem.FNumber AS 排序编号3, dbo_t_ICItem.FNumber AS 排序编号4
FROM ((查询_BOM组件清单 LEFT JOIN dbo_ICBOMChild ON 查询_BOM组件清单.FInterID = dbo_ICBOMChild.FInterID) LEFT JOIN dbo_t_ICItem ON dbo_ICBOMChild.FItemID = dbo_t_ICItem.FItemID) LEFT JOIN BOM表部品属性 ON dbo_ICBOMChild.FEntrySelfZ0130 = BOM表部品属性.BOM表部品属性ID
WHERE (((查询_BOM组件清单.FNumber)="01.AN8800002"));
INSERT INTO BOM展开结构临时表 ( BOM等级, 部品长代码, 部品名称, 用量, 一级组件编号, 二级组件编号, 三级组件编号, 四级组件编号 )
SELECT 2 AS BOM部品等级, 查询_BOM一级结构.子部品编号, 查询_BOM一级结构.子部品名称, 查询_BOM一级结构.用量, BOM展开结构临时表.部品长代码, 查询_BOM一级结构.子部品编号, BOM展开结构临时表.部品长代码 AS 排序编号3, BOM展开结构临时表.部品长代码 AS 排序编号4
FROM BOM展开结构临时表 INNER JOIN 查询_BOM一级结构 ON BOM展开结构临时表.部品长代码 = 查询_BOM一级结构.母部品编号;
请问,这两个追加查询如何和成一个。
|
|