我有树桌:
1。 项目
itm_code,itm_gsm,itm_size
2。 LotMaster
lot_code,itm_code,po_number,lot_number
3。 LotItems
lot_itm_code,lot_code,lot_itm_qty
如何获取po_number和lot_number的用户输入值的itm_gsm,itm_qty,lot_itm_qty?
答案 0 :(得分:0)
select itm.Itm_gsm,itm.itm_qty ltm.lot_itm_qty from Items itm inner join LotMaster lm on lm.itm_code=itm.itm_code inner join LotItems ltm on ltm.lot_code=lm.lot_code where lm.po_number=@po_number and lm.lot_number=@lot_number;