Difference between revisions of "VbzCart/queries/qryStk byItem byBin wInfo"
Jump to navigation
Jump to search
(used by qryStock_forOpenOrders) |
(+p.Descr) |
||
Line 2: | Line 2: | ||
* '''Requires''': {{vbzcart/query|v_stk_byItemAndBin}}, {{vbzcart/query|qryCat_Items}} | * '''Requires''': {{vbzcart/query|v_stk_byItemAndBin}}, {{vbzcart/query|qryCat_Items}} | ||
* '''Used by''': {{vbzcart/query|qryStock_forOpenOrders}} | * '''Used by''': {{vbzcart/query|qryStock_forOpenOrders}} | ||
+ | * '''History''': | ||
+ | ** '''2009-02-07''' Added p.Descr so "stock needed for orders" can show where bins are | ||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>CREATE OR REPLACE VIEW v_stk_byItemAndBin_wInfo AS | <section begin=sql /><mysql>CREATE OR REPLACE VIEW v_stk_byItemAndBin_wInfo AS | ||
Line 9: | Line 11: | ||
b.ID_Place, | b.ID_Place, | ||
b.Code AS BinCode, | b.Code AS BinCode, | ||
− | b.Descr AS BinDescr | + | b.Descr AS BinDescr, |
+ | p.Descr AS PlcDescr | ||
FROM | FROM | ||
− | ( | + | (( |
− | + | v_stk_byItemAndBin AS s LEFT JOIN qryCat_Items AS i ON s.ID_Item=i.ID | |
− | + | ) LEFT JOIN stk_bins AS b ON s.ID_Bin=b.ID | |
+ | ) LEFT JOIN stk_places AS p ON b.ID_Place=p.ID;</mysql> | ||
<section end=sql /> | <section end=sql /> |
Revision as of 02:22, 8 February 2009
Details
- Requires:
- REDIRECT Template:l/vc/query, qryCat_Items
- Used by: qryStock_forOpenOrders
- History:
- 2009-02-07 Added p.Descr so "stock needed for orders" can show where bins are
SQL
<mysql>CREATE OR REPLACE VIEW v_stk_byItemAndBin_wInfo AS
SELECT s.*, i.*, b.ID_Place, b.Code AS BinCode, b.Descr AS BinDescr, p.Descr AS PlcDescr FROM (( v_stk_byItemAndBin AS s LEFT JOIN qryCat_Items AS i ON s.ID_Item=i.ID ) LEFT JOIN stk_bins AS b ON s.ID_Bin=b.ID ) LEFT JOIN stk_places AS p ON b.ID_Place=p.ID;</mysql>