VbzCart/docs/queries/qryItems prices
Jump to navigation
Jump to search
Details
- Requires: cat_items, cat_ittyps
- Used by:
- Future: This will eventually contain shipping prices as well, but the shipping costs table hasn't been migrated as of this writing. It also needs to build a description from it.NameSng and i.ItOpt_Descr -- or perhaps there is a better way to do it (haven't we solved this problem elsewhere in a view?)
SQL
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryItems_prices AS SELECT
i.ID, i.CatNum, i.ID_Title, i.ID_ItTyp, i.ID_ShipCost, i.PriceSell, i.PriceList, i.ItOpt_Descr, i.isInPrint, it.NameSng, it.NamePlr, it.Descr as ItTyp_Descr
FROM (cat_items AS i LEFT JOIN cat_ittyps AS it ON i.ID_ItTyp=it.ID) WHERE i.isForSale AND (NULLIF(i.isPulled,0) IS NULL) AND (i.ID_ShipCost IS NOT NULL) AND (i.PriceSell IS NOT NULL) ORDER BY i.CatNum;</mysql> <section end=sql />