VbzCart/docs/queries/qryCbx Items data: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Jump to navigation Jump to search
imported>Woozle
(moved from single-page listing)
 
m (Woozle moved page VbzCart/VbzCart/queries/qryCbx Items data to VbzCart/docs/queries/qryCbx Items data without leaving a redirect: part 2)
 
(No difference)

Latest revision as of 01:55, 25 February 2024

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 />