VbzCart/docs/queries/qryRstkReq Item status Req info: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (New page: ==Details== * '''Returns''': Data from {{vbzcart/query|qryRstkReq_Item_status}} with some additional info about the request * '''Requires''': {{vbzcart/query|qryRstkReq_Item_status}}, {{vb...) |
m (Woozle moved page VbzCart/VbzCart/queries/qryRstkReq Item status Req info to VbzCart/docs/queries/qryRstkReq Item status Req info without leaving a redirect: part 2) |
||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
* '''History''': | * '''History''': | ||
** '''2008-11-23''' Created for new restock process | ** '''2008-11-23''' Created for new restock process | ||
** '''2008-12-22''' Added '''WhenOrphaned''' field, so we can see all possible causes of a restock being inactive | |||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryRstkReq_Item_status_Req_info AS | <section begin=sql /><mysql>CREATE OR REPLACE VIEW qryRstkReq_Item_status_Req_info AS | ||
Line 11: | Line 12: | ||
IFNULL(rq.WhenOrdered,rq.WhenCreated) AS WhenMade, | IFNULL(rq.WhenOrdered,rq.WhenCreated) AS WhenMade, | ||
rq.WhenClosed, | rq.WhenClosed, | ||
rq.WhenKilled | rq.WhenKilled, | ||
rq.WhenOrphaned | |||
FROM qryRstkReq_Item_status AS rqis LEFT JOIN rstk_req AS rq ON rqis.ID_RstkReq=rq.ID | FROM qryRstkReq_Item_status AS rqis LEFT JOIN rstk_req AS rq ON rqis.ID_RstkReq=rq.ID | ||
ORDER BY WhenMade,ID_RstkReq;</mysql> | ORDER BY WhenMade,ID_RstkReq;</mysql> | ||
<section end=sql /> | <section end=sql /> |
Latest revision as of 01:55, 25 February 2024
Details
- Returns: Data from Template:Vbzcart/query with some additional info about the request
- Requires: Template:Vbzcart/query, Template:Vbzcart/table
- Used by: sfrmItem_Rstks (MS Access)
- History:
- 2008-11-23 Created for new restock process
- 2008-12-22 Added WhenOrphaned field, so we can see all possible causes of a restock being inactive
SQL
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryRstkReq_Item_status_Req_info AS SELECT
rqis.*, IFNULL(rq.WhenOrdered,rq.WhenCreated) AS WhenMade, rq.WhenClosed, rq.WhenKilled, rq.WhenOrphaned
FROM qryRstkReq_Item_status AS rqis LEFT JOIN rstk_req AS rq ON rqis.ID_RstkReq=rq.ID ORDER BY WhenMade,ID_RstkReq;</mysql> <section end=sql />