SELECT h.order_number, l.line_id, l.ordered_quantity, l.shipped_quantity,l.invoiced_quantity, wdd.delivery_detail_id,wnd.delivery_id,wdd.shipped_quantity,a.org_id, a.creation_date ,a.

trx_number,b.quantity_ordered , b.quantity_invoiced ,b.interf ace_line_attribute1,b.interface_line_attribute3, b.interface_line_attribute6,interface_line_attribute12 from ra_customer_trx_all a, ra_customer_trx_lines_all b, oe_order_headers_all h, oe_order_lines_all l, wsh_delivery_details wdd, wsh_delivery_assignments wda, wsh_new_deliveries wnd where a.customer_trx_id = b.customer_trx_id and a.interface_header_context = 'ORDER ENTRY' and b.interface_line_attribute1 = to_char(h.order_number) and h.header_id = l.header_id and to_char(l.line_id) = b.interface_line_attribute6 and l.line_id = wdd.source_line_id and wdd.delivery_detail_id = wda.delivery_detail_id and wda.delivery_id = wnd.delivery_id and to_char(wnd.delivery_id) = b.interface_line_attribute3