VbzCart/queries/qryRstkReq Item status: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
New page: ==Details== * '''Returns''': Information about items Restock Requested and how many have been Received * '''Requires''': {{vbzcart/table|rstk_req_item}}, {{vbzcart/query|qryRstkReq_Item_Rc...
 
QtyOrd -> QtyExp
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
==Details==
==Details==
* '''Returns''': Information about items Restock Requested and how many have been Received
* '''Returns''': Information about items Restock Requested and how many have been Received
* '''Status''': possibly no longer in use (2010-01-04), unless it turns out to be faster this way
* '''Requires''': {{vbzcart/table|rstk_req_item}}, {{vbzcart/query|qryRstkReq_Item_Rcd_status}}
* '''Requires''': {{vbzcart/table|rstk_req_item}}, {{vbzcart/query|qryRstkReq_Item_Rcd_status}}
* '''Used by''': {{vbzcart/query|qryRstkReq_Item_status_Req_info}}
* '''Used by''': {{vbzcart/query|qryRstkReq_Item_status_Req_info}}, {{vbzcart/query|qryRstkReq_Items_expected}}
* '''History''':
* '''History''':
** '''2008-11-21''' Created for new restock process
** '''2008-11-21''' Created for new restock process
** '''2010-01-04''' QtyExp replaces QtyOrd
* '''Fields''':
* '''Fields''':
** '''WhenFirstOrder / WhenFinalorder''' are timestamps of ''customer'' orders for this item
** '''WhenFirstOrder / WhenFinalorder''' are timestamps of ''customer'' orders for this item
Line 11: Line 13:
SELECT
SELECT
   rci.*,
   rci.*,
   rqi.QtyOrd,
   IFNULL(rqi.QtyExp,rqi.QtyOrd) AS QtyExp,
   rqi.Notes
   rqi.Notes
FROM
FROM

Latest revision as of 00:57, 5 January 2010

Details

SQL

<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryRstkReq_Item_status AS SELECT

 rci.*,
 IFNULL(rqi.QtyExp,rqi.QtyOrd) AS QtyExp,
 rqi.Notes

FROM

   rstk_req_item AS rqi
 LEFT JOIN qryRstkReq_Item_Rcd_status AS rci ON (rqi.ID_Restock=rci.ID_RstkReq) AND (rqi.ID_Item=rci.ID_Item)

WHERE rci.ID_RstkReq IS NOT NULL ORDER BY rci.ID_RstkReq, rci.ID_Item;</mysql> <section end=sql />