SQL:='select * from corrugated_plate_orders cpo join customers c on cpo.COMPANY_ID = c.CUSTOMER_ID where ORDER_ID = 18690';
SQL:='select * from '+table+' cpo join customers c on cpo.COMPANY_ID = c.CUSTOMER_ID join customers_ship cs on cpo.staff_fields_ship_to = cs.ship_block JOIN qb_items ON cpo.staff_fields_quickbooks_item = qb_items.qb_item_name where ORDER_ID = '+ORDER_ID;