VbzCart/queries/qryRstkReq by PurchOrd: 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: ==About== * '''Purpose''': One of two queries which are UNIONed to create {{vbzcart/query|qryRstkReq}} * '''Requires''': {{vbzcart/table|rstk_req}} * '''History''': ** '''200... |
m updated name of the query this is used for |
||
| Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Purpose''': One of two queries which are [[SQL/UNION|UNION]]ed to create {{vbzcart/query| | * '''Purpose''': One of two queries which are [[SQL/UNION|UNION]]ed to create {{vbzcart/query|qryCbx_RstkReq}} | ||
* '''Requires''': {{vbzcart/table|rstk_req}} | * '''Requires''': {{vbzcart/table|rstk_req}} | ||
* '''History''': | * '''History''': | ||
Revision as of 18:54, 22 December 2008
About
- Purpose: One of two queries which are UNIONed to create qryCbx_RstkReq
- Requires: rstk_req
- History:
- 2008-12-22 Adapted from the discarded query qryCbxRestock_by_PurchOrd
SQL
<mysql>CREATE OR REPLACE VIEW qryCbx_RstkReq_by_PurchOrd AS SELECT
r.ID, CAST(r.PurchOrdNum AS CHAR) AS Descr, NOT IsLocked AS IsOpen, r.WhenOrdered, r.WhenConfirmed, r.ID_Supplier
FROM rstk_req AS r WHERE r.PurchOrdNum IS NOT NULL ORDER BY COALESCE(r.WhenKilled,r.WhenOrdered,r.WhenCreated) DESC;</mysql>
