VbzCart/docs/queries/qtyOrderItems Active: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (New page: ==Details== * '''Returns''': Same as qryOrderLines_Active, but by Item instead of OrdLine (and leaving out extra info about items which might return multiple re...) |
m (Woozle moved page VbzCart/VbzCart/queries/qtyOrderItems Active to VbzCart/docs/queries/qtyOrderItems Active without leaving a redirect: part 3/5) |
(No difference)
|
Latest revision as of 01:56, 25 February 2024
Details
- 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
SQL
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryOrderItems_Active AS SELECT
ID_Order, ID_Item, SUM(QtyOrd) AS QtyOrd, COUNT(ID) AS CountLines
FROM qryOrderLines_Active GROUP BY ID_Order, ID_Item;</mysql> <section end=sql />