SELECT tracking.*, po_count_placed.order_times_2, po_count_short.order_times_short, summary.QTY_ORDERED AS Total_Order, "
Sql = Sql & " summary.QTY_RECEIVED AS Total_RCV, po_on_order.QTY_ORDERED AS On_order"
Sql = Sql & " FROM (((tracking LEFT JOIN po_count_placed ON tracking.货号 = po_count_placed.ITEM) LEFT JOIN po_count_short ON "
Sql = Sql & " tracking.货号 = po_count_short.ITEM) LEFT JOIN po_on_order ON (tracking.货号 = po_on_order.ITEM) AND (tracking.供应商编号 = "
Sql = Sql & " po_on_order.SUPPLIER)) LEFT JOIN summary ON (tracking.货号 = summary.ITEM) AND (tracking.供应商编号 = summary.SUPPLIER)" |