VbzCart/queries/qryRstkReq by PurchOrd
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
About
- Purpose: One of two queries which are UNIONed to create
- REDIRECT Template:l/vc/query
- Requires:
- REDIRECT Template:l/vc/table
- History:
- 2008-12-22 Adapted from the discarded query qryCbxRestock_by_PurchOrd
SQL
<mysql>CREATE OR REPLACE VIEW qryRstkReq_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>