下面hive不对,不知道哪错了
select
b.D as AA,
b.S as BB,
b.R as TT,
b.I as WW,
i.L as OII,
i.N as MM,
(select TTW from 表t as t
join 表h as h
on t.ITEMCODE = h.ITEMCODE
and h.ITEMID =i.ITEMID
)as Product_name,
i.P as PEJ,
i.Ba as BarRR
from 表b as b
left join 表I as l on l.InventLocationID=b.InventLocationID
left join 表i as i on i.PURCHID=b.PURCHID
where b.OrderNumber='10170R'