VbzCart/queries/qryCat Items Stock

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Revision as of 13:42, 7 May 2009 by Woozle (talk | contribs) (About: space -> underscore)

About

SQL

<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCat_Items_Stock AS SELECT

 i.*,
 SUM(st.qtyForSale) AS qtyForSale,
 SUM(st.qtyForShip) AS qtyForShip

FROM (cat_items AS i LEFT JOIN v_stk_items_remaining AS st on i.ID=st.ID_Item) GROUP BY i.ID;</mysql> <section end=sql />