Difference between revisions of "VbzCart/queries/qryStk Bins w info"
Jump to navigation
Jump to search
(created) |
(obsolete now) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==About== | ==About== | ||
− | * '''Returns''': stk_bins with additional information | + | * '''OBSOLETE''': replaced by '''vcqtStockBinsInfo''' methods |
+ | * '''Returns''': stk_bins with additional information | ||
* '''Requires''': {{vbzcart|table|stk_bins}}, {{vbzcart/query|qryStk_lines_remaining_byBin}} | * '''Requires''': {{vbzcart|table|stk_bins}}, {{vbzcart/query|qryStk_lines_remaining_byBin}} | ||
* '''Used by''': Special:VbzAdmin's stock bin listing page | * '''Used by''': Special:VbzAdmin's stock bin listing page | ||
* '''History''': | * '''History''': | ||
** '''2009-04-29''' Created for Special:VbzAdmin | ** '''2009-04-29''' Created for Special:VbzAdmin | ||
+ | ** '''2017-03-24''' obsoleted | ||
==SQL== | ==SQL== | ||
− | + | <mysql>CREATE OR REPLACE VIEW qryStk_Bins_w_info AS | |
SELECT | SELECT | ||
sb.*, | sb.*, | ||
+ | sp.Name AS PlaceName, | ||
sq.QtyForSale, | sq.QtyForSale, | ||
sq.QtyForShip, | sq.QtyForShip, | ||
Line 14: | Line 17: | ||
FROM stk_bins AS sb | FROM stk_bins AS sb | ||
LEFT JOIN qryStk_lines_remaining_byBin AS sq | LEFT JOIN qryStk_lines_remaining_byBin AS sq | ||
− | + | ON sb.ID=sq.ID_Bin | |
− | + | LEFT JOIN stk_places as sp | |
+ | ON sb.ID_Place=sp.ID;</mysql> |
Latest revision as of 19:22, 24 March 2017
About
- OBSOLETE: replaced by vcqtStockBinsInfo methods
- Returns: stk_bins with additional information
- Requires: stk_bins,
- REDIRECT Template:l/vc/query
- Used by: Special:VbzAdmin's stock bin listing page
- History:
- 2009-04-29 Created for Special:VbzAdmin
- 2017-03-24 obsoleted
SQL
<mysql>CREATE OR REPLACE VIEW qryStk_Bins_w_info AS
SELECT sb.*, sp.Name AS PlaceName, sq.QtyForSale, sq.QtyForShip, sq.QtyExisting FROM stk_bins AS sb LEFT JOIN qryStk_lines_remaining_byBin AS sq
ON sb.ID=sq.ID_Bin
LEFT JOIN stk_places as sp
ON sb.ID_Place=sp.ID;</mysql>