select a.*,b.*
from(
select t1.line_id,abs(sum(t1.quantity)) db_so,abs(t2.ordered_quantity) od_so from SECOM_SOPO_MATCHES t1,ont.oe_order_lines_all t2
where t1.line_id=t2.line_id
--and t1.line_id=466338
group by t1.line_id,t2.ordered_quantity
having abs(sum(t1.quantity))<>abs(t2.ordered_quantity)
) a
,(
select ol.line_id, oh.order_number, ol.ordered_item ,ol.creation_date
from oe_order_lines_all ol
,oe_order_headers_all oh
where ol.header_id=oh.header_id
) b
where a.line_id=b.line_id