VbzCart/queries/qtyOrderItems Active

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to: navigation, search


  • Returns: Same as qryOrderLines_Active, but by Item instead of OrdLine (and leaving out extra info about items which might return multiple records due to slight differences)
  • Requires: qryOrderLines_Active
  • Used by:
  • Notes: In theory, the same item should never appear on more than one line in an order -- but current data has two older records in which this actually did take place. This query provides order-line data consolidated by item, in case it happens again.
  • History:
    • 2008-11-16 created for new restocking process


<mysql>CREATE OR REPLACE VIEW qryOrderItems_Active AS SELECT

 SUM(QtyOrd) AS QtyOrd,
 COUNT(ID) AS CountLines

FROM qryOrderLines_Active GROUP BY ID_Order, ID_Item;</mysql>