VbzCart/docs/queries/qryCat Depts: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Jump to navigation Jump to search
imported>Woozle
(→‎SQL: +isActive; created About section)
m (Woozle moved page VbzCart/VbzCart/queries/qryCat Depts to VbzCart/docs/queries/qryCat Depts without leaving a redirect: part 2)
 
(No difference)

Latest revision as of 01:55, 25 February 2024

About

SQL

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

 SELECT
   d.ID,
   d.Name,
   d.Sort,
   d.CatKey,
   UPPER(IFNULL(d.PageKey,d.CatKey)) AS CatKey_def,
   d.isActive,
   d.ID_Supplier,
   UPPER(CONCAT_WS('-',s.CatKey,d.CatKey)) AS CatNum,
   LOWER(CONCAT_WS("/",s.CatKey,IFNULL(d.PageKey,d.CatKey))) AS CatWeb_Dept,
   LOWER(CONCAT_WS("/",s.CatKey,d.CatKey)) AS CatWeb_Title
 FROM cat_depts AS d LEFT JOIN cat_supp AS s ON d.ID_Supplier=s.ID;</mysql>

<section end=sql />