VbzCart/docs/queries/qryCbx Items data

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Revision as of 01:55, 25 February 2024 by Woozle (talk | contribs) (Woozle moved page VbzCart/VbzCart/queries/qryCbx Items data to VbzCart/docs/queries/qryCbx Items data without leaving a redirect: part 2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Details

SQL

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

 i.ID,
 CAST(
   CONCAT(
     if(i.isPulled,
       '*P* ',
       
     ),
     if(i.CatNum IS NULL,
       CONCAT('#',i.ID,' (no cat#)')
       ,i.CatNum),
     if(i.Supp_CatNum IS NULL,
       ,
       CONCAT(' [',i.Supp_CatNum,']')
     ),
     if(i.isForSale,,' *n/a*'),
     ' ',
     if(i.Descr IS NULL,'no description',i.Descr)
   ) AS CHAR
 ) AS Descr,
 i.isPulled,
 i.isForSale,
 i.ID_Title,
 i.CatNum,
 i.Supp_CatNum,
 i.PriceSell,
 i.QtyMin_Stk

FROM qryCat_Items AS i ORDER BY NOT i.isPulled, i.isForSale, i.CatNum;</mysql> <section end=sql />