VbzCart/queries/qryStk lines remaining byBin

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:03, 29 April 2009 by Woozle (talk | contribs) (created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Returns: list of bins, with stock quantities for each (for sale, for shipping, existing)
  • Requires:
  1. REDIRECT Template:l/vc/query

SQL

<mysql>CREATE OR REPLACE VIEW qryStk_lines_remaining_byBin AS

 SELECT
   ID_Bin,
   SUM(QtyForSale) AS QtyForSale,
   SUM(QtyForShip) AS QtyForShip,
   SUM(QtyExisting) AS QtyExisting
 FROM v_stk_lines_remaining GROUP BY ID_Bin;</mysql>