이쿼리랑 이쿼리를 합칠수있을까요?
as B on A.item_code = b.item_code
where a.chgo_date >= :bDATE and a.chgo_date <= :bDATE2 and
a.item_type like :bitem_type and a.cust_cod like ::bcust_code
select b.cust_name,c.item_name,A.item_type, A.chgo_date,A.cust_code,A.item_code,A.chgo_qnty,A.chgo_dann,A.chgo_amnt,(chgo_amnt*0.1) as chgo_vats,
(A.chgo_amnt+(chgo_amnt*0.1)) as AMNT_VATS,(chgo_amnt) as TOTA_AMNT,(chgo_amnt*0.1) as TOTA_VATS,(A.chgo_amnt+(chgo_amnt*0.1)) as AMNT_VATSS
from ITEM_CHGO as A with(nolock)
left join
CUST_INFO B
on a.cust_code = b.cust_Code
left join
item_info c
on a.item_code = c.item_code
where a.cust_code = '0009'
SELECT b.cust_name , c.item_name , A.item_type , A.chgo_date , A.cust_code , A.item_code , A.chgo_qnty , A.chgo_dann , A.chgo_amnt , (chgo_amnt*0.1) as chgo_vats , (A.chgo_amnt+(chgo_amnt*0.1)) as AMNT_VATS , (chgo_amnt) as TOTA_AMNT , (chgo_amnt*0.1) as TOTA_VATS , (A.chgo_amnt+(chgo_amnt*0.1)) as AMNT_VATSS FROM item_chgo AS A with(nolock) LEFT JOIN cust_info b ON a.cust_code = b.cust_Code LEFT JOIN item_info c ON a.item_code = c.item_code WHERE a.cust_code = '0009' AND a.chgo_date >= :bDATE AND a.chgo_date <= :bDATE2 AND a.item_type LIKE :bitem_type AND a.cust_cod LIKE :bcust_code ;