Difference between revisions of "VbzCart/queries/qryStk Bins w info"
Jump to navigation
Jump to search
(created) |
(+PlaceName) |
||
Line 1: | Line 1: | ||
==About== | ==About== | ||
− | * '''Returns''': stk_bins with additional information | + | * '''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 | ||
Line 9: | Line 9: | ||
SELECT | SELECT | ||
sb.*, | sb.*, | ||
+ | sp.Name AS PlaceName, | ||
sq.QtyForSale, | sq.QtyForSale, | ||
sq.QtyForShip, | sq.QtyForShip, | ||
Line 14: | Line 15: | ||
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> | ||
<section end=sql /> | <section end=sql /> |
Revision as of 23:58, 29 April 2009
About
- 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
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>