SEL ECT A.GYSID, c.全称 AS 默认供应商, A._Identify, A._Locked, A._SortKey, A.Itid, A.Fid, A.Fdel, A.料号, A.名称, A.规格, A.Dwid, A.封包数量, A.备注, A.图片, A.最少库存量,
A.最大库存量, A.安全库存数, A.技术文件, A.封装, A.数值, A.负责人ID, A.阶层, A.型号, A.Cwid, (CASE WHEN a.fid = 1 THEN 'Y' END) AS 使用标志,
(CASE WHEN a.Fdel = 1 THEN 'Y' END) AS 冻结标志, A.FZJ, A.FJItid, d.名称 AS 父阶名称, d.料号 AS 父阶料号, f.名称 AS 仓位, A.CKiD, f1.名称 AS 默认仓库, f.FjID,
A.父料号, A.kwid, A.旧料号, A.MOQ, A.WLSX, f2.名称 AS 物料属性, f3.名称 AS 单位, e1.用户名 AS 新增人, e2.用户名 AS 修改人, A.新增人ID, A.新增日期, A.修改人ID,
A.修改日期, e3.用户名 AS 默认采购员, A.Xhid
FR OM dbo.物料表 AS A LEFT OUTER JOIN
dbo.物料表 AS d ON A.FJItid = d.Itid LEFT OUTER JOIN
dbo.GYSB AS c ON A.GYSID = c.Itid LEFT OUTER JOIN
dbo.基础表 AS f ON A.Cwid = f.Itid LEFT OUTER JOIN
dbo.基础表 AS f1 ON f.FjID = f1.Itid LEFT OUTER JOIN
dbo.基础表 AS f2 ON f2.Itid = A.WLSX LEFT OUTER JOIN
dbo.基础表 AS f3 ON A.Dwid = f3.Itid LEFT OUTER JOIN
dbo.UseB AS e1 ON A.新增人ID = e1.Itid LEFT OUTER JOIN
dbo.UseB AS e2 ON A.修改人ID = e2.Itid LEFT OUTER JOIN
dbo.UseB AS e3 ON A.负责人ID = e3.Itid
CREATE VIEW [WLB] AS S ELECT A.GYSID, c.全称 AS 默认供应商, A._Identify, A._Locked, A._SortKey, A.Itid, A.Fid, A.Fdel, A.料号, A.名称, A.规格, A.Dwid, A.封包数量, A.备注, A.图片, A.最少库存量, A.最大库存量, A.安全库存数, A.技术文件, A.封装, A.数值, A.负责人ID, A.阶层, A.型号, A.Cwid, (CASE WHEN a.fi