VbzCart/queries/qryPkgLines byOrdLine andItem

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 23:41, 3 December 2008 by Woozle (talk | contribs) (New page: ==Details== * '''Requires''': {{vbzcart/table|ord_pkg_lines}} * '''Used by''': ==SQL== <section begin=sql /><mysql>CREATE OR REPLACE VIEW qryPkgLines_byOrdLine_andItem AS SELECT ID_OrdLi...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Details

  • Requires:
  1. REDIRECT Template:l/vc/table
  • Used by:

SQL

<mysql>CREATE OR REPLACE VIEW qryPkgLines_byOrdLine_andItem AS SELECT

 ID_OrdLine,
 ID_Item,
 Sum(
   IFNULL(pl.QtyShipped,0)+
   IFNULL(pl.QtyNotAvail,0)+
   IFNULL(pl.QtyKilled,0)
   ) AS QtyDone,
 Sum(pl.QtyShipped) AS QtyShipped,
 Sum(pl.QtyNotAvail) AS QtyNotAvail,
 Sum(pl.QtyKilled) AS QtyKilled,
 Sum(pl.QtyExtra) AS QtyExtra

FROM ord_pkg_lines AS pl GROUP BY ID_OrdLine, ID_Item;</mysql>