SELECT cus_firstname ,cus_lastname ,cus_company ,cus_addr1 ,cus_addr2 ,cus_number ,cus_hold ,cus_cashonly ,are_name ,rte_name ,inv_number ,inv_date ,inv_pieces ,inv_weight ,inv_goodsvalue ,awb_pk ,awb_number ,awb_manifestdate ,awb_manifestnumber ,cnt_code ,ivd_amount ,cty_name FROM Customers INNER JOIN Areas ON cus_arefk = are_pk inner join Routes on cus_rtefk = rte_pk INNER JOIN Countries ON cus_cntfk = cnt_pk INNER JOIN Invoices ON cus_PK = Invoices.inv_cusfk INNER JOIN AirWayBills ON inv_awbfk = awb_pk INNER JOIN InvoiceDetails ON inv_pk = ivd_invfk INNER JOIN ChargeTypes ON ivd_ctyfk = cty_pk WHERE ([awb_manifestnumber] = @awb_manifestnumber) ORDER BY rte_name ,are_name ,cus_number ,inv_number ,cty_nameand this which does (removed the joins on InvoiceDetails and ChargeTypes):
SELECT cus_firstname ,cus_lastname ,cus_company ,cus_addr1 ,cus_addr2 ,cus_number ,cus_hold ,cus_cashonly ,are_name ,rte_name ,inv_number ,inv_date ,inv_pieces ,inv_weight ,inv_goodsvalue ,awb_pk ,awb_number ,awb_manifestdate ,awb_manifestnumber ,cnt_code FROM Customers INNER JOIN Areas ON cus_arefk = are_pk inner join Routes on cus_rtefk = rte_pk INNER JOIN Countries ON cus_cntfk = cnt_pk INNER JOIN Invoices ON cus_PK = Invoices.inv_cusfk INNER JOIN AirWayBills ON inv_awbfk = awb_pk WHERE ([awb_manifestnumber] = @awb_manifestnumber) ORDER BY rte_name ,are_name ,cus_number ,inv_number