Difference between revisions of "VbzCart/queries/qryRstkReq Items expected"
Jump to navigation
Jump to search
(corrected slightly, but deprecated anyway) |
(...oh, and the future has been dealt with.) |
||
Line 7: | Line 7: | ||
** '''2010-01-03''' Created for generating list of needed items | ** '''2010-01-03''' Created for generating list of needed items | ||
** '''2010-01-04''' This query now deprecated and can probably be deleted; using QtyExp instead of QtyOrd for verification of results | ** '''2010-01-04''' This query now deprecated and can probably be deleted; using QtyExp instead of QtyOrd for verification of results | ||
− | |||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryRstkReq_Items_expected AS | <section begin=sql /><mysql>CREATE OR REPLACE VIEW qryRstkReq_Items_expected AS |
Latest revision as of 00:16, 6 January 2010
About
- Purpose: Returns a list of items we're currently expecting to receive in restocks, based on items requested (in active restock requests only) less items already received for those requests
- Requires:
- REDIRECT Template:l/vc/query
- Used by : DEPRECATED - seems less accurate than qryRstkItms_expected_byItem
- Related: Like qryRstkItms_expected, but grouped by Item (eliminates rstk_req data)
- History:
- 2010-01-03 Created for generating list of needed items
- 2010-01-04 This query now deprecated and can probably be deleted; using QtyExp instead of QtyOrd for verification of results
SQL
<mysql>CREATE OR REPLACE VIEW qryRstkReq_Items_expected AS SELECT
ID_Item, SUM(QtyRecd) AS QtyRecd, SUM(QtyExp) AS QtyExp
FROM qryRstkReq_Item_status GROUP BY ID_Item HAVING SUM(QtyExp)-SUM(QtyRecd)>0;</mysql>