VbzCart/queries/qryOrdItms Pkg qtys

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | queries
Revision as of 21:22, 3 December 2008 by Woozle (talk | contribs) (New page: ==Details== * '''Requires''': qryOrderLines_Active, qry_PkgItem_qtys_byOrder * '''Used by''': * '''History''': ** '''2008-11-16...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Details

SQL

<mysql>CREATE OR REPLACE VIEW qryOrdItms_Pkg_qtys AS SELECT

 oi.ID_Item,
 oi.ID_Order,
 oi.QtyOrd,
 piq.QtySent,
 piq.QtyDone,
 oi.QtyOrd-IFNULL(piq.QtyDone,0) AS QtyOpen

FROM qryOrderItems_Active AS oi

 LEFT JOIN qry_PkgItem_qtys_byOrder AS piq
   ON (piq.ID_Item=oi.ID_Item) AND (piq.ID_Order=oi.ID_Order)

ORDER BY oi.ID_Item, oi.ID_Order;</mysql>