VbzCart/docs/queries/qryStk History

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Revision as of 19:15, 29 December 2008 by imported>Woozle (New page: ==About== * '''Purpose''': {{vbzcart/table|stk_history}} plus {{vbzcart/table|stk_history_legacy}} data, if any, with IDs adjusted to prevent duplicates. Lets you see the complete history ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: Template:Vbzcart/table plus Template:Vbzcart/table data, if any, with IDs adjusted to prevent duplicates. Lets you see the complete history including legacy stuff, without polluting the main log with non-fixable legacy data.
  • History:
    • 2008-12-29 Created

SQL

<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryStk_History AS SELECT * FROM stk_history UNION SELECT

 CAST(ID-5000 AS SIGNED) AS ID,
 ID_StkBin,
 ID_StkLine,
 CH_OthType,
 ID_OthCont,
 ID_OthLine,
 IDS_OthCont,
 ID_Item,
 QtyBefore,
 QtyAdded,
 QtyAfter,
 QtyBinBefore,
 QtyBinAfter,
 `When`,
 What,
 Notes
 FROM stk_history_legacy;

</mysql> <section end=sql />