select i.lottable02 供应商代码, sr.company 供应商名称, o.consigneekey 发货地, TO_CHAR(o.requestedshipdate + 8 / 24, 'yyyy-mm-dd hh24:mi:ss') 需求时间, o.notes 需求订单, i.sku 物料编码, s.susr1 物料组, s.descr 物料名称, i.lottable08 寄存属性, sum(i.qty) 数量 from (select * from itrn where trantype = 'WD') i join sku s on i.sku = s.sku where exists(select * from storer as sr where i.lottable02 = sr.storerkey and type = 2) and exists(select * from orders as o where o.orderkey = substr(i.sourcekey, 0, 10)) |