VbzCart/docs/queries/qryCat Titles: 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/qryCat Titles to VbzCart/docs/queries/qryCat Titles without leaving a redirect: part 2)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[category:VbzCart/deprecated]]
==Details==
==Details==
* '''Requires''': [[../../tables/cat_titles|cat_titles]], [[../qryCat_Depts|qryCat_Depts]]
* '''Status''': DEPRECATED -- does not retrieve titles that have no department. Departments are being discontinued, so this is a problem.
* '''Requires''': {{vbzcart|table|cat_titles}}, {{vbzcart/query|qryCat_Depts}}
* '''Fields''':
* '''Fields''':
** '''CatKey_Title''' is used in the catalog-building process (Enter Title Groups) when searching within a supplier for a particular title
** '''CatKey''' is used in the catalog-building process (Enter Title Groups) when searching within a supplier for a particular title
* '''History''':
** '''2010-11-06''' Changed '''CatKey_Title''' back to '''CatKey''' because "Title" should be the default context for this query
** '''2011-01-29''' Added "t.Desc AS Descr" and "t.Search" to help with searching; t.Desc should eventually be renamed to t.Descr because "DESC" is an SQL keyword
** '''2012-03-05''' DEPRECATED - should be removed from database and all pages checked to make sure they still work
==SQL==
==SQL==
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCat_Titles AS
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCat_Titles AS
Line 8: Line 14:
     t.ID,
     t.ID,
     t.Name,
     t.Name,
    t.Desc AS Descr,
    t.Search,
     UPPER(CONCAT_WS("-",d.CatNum,t.CatKey)) AS CatNum,
     UPPER(CONCAT_WS("-",d.CatNum,t.CatKey)) AS CatNum,
     LOWER(CONCAT_WS("/",d.CatWeb_Title,t.CatKey)) AS CatWeb,
     LOWER(CONCAT_WS("/",d.CatWeb_Title,t.CatKey)) AS CatWeb,
     t.CatKey AS CatKey_Title,
     t.CatKey,
     d.ID_Supplier,
     d.ID_Supplier,
     t.ID_Dept,
     t.ID_Dept,

Latest revision as of 01:55, 25 February 2024

Details

  • Status: DEPRECATED -- does not retrieve titles that have no department. Departments are being discontinued, so this is a problem.
  • Requires: Template:Vbzcart, Template:Vbzcart/query
  • Fields:
    • CatKey is used in the catalog-building process (Enter Title Groups) when searching within a supplier for a particular title
  • History:
    • 2010-11-06 Changed CatKey_Title back to CatKey because "Title" should be the default context for this query
    • 2011-01-29 Added "t.Desc AS Descr" and "t.Search" to help with searching; t.Desc should eventually be renamed to t.Descr because "DESC" is an SQL keyword
    • 2012-03-05 DEPRECATED - should be removed from database and all pages checked to make sure they still work

SQL

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

 SELECT
   t.ID,
   t.Name,
   t.Desc AS Descr,
   t.Search,
   UPPER(CONCAT_WS("-",d.CatNum,t.CatKey)) AS CatNum,
   LOWER(CONCAT_WS("/",d.CatWeb_Title,t.CatKey)) AS CatWeb,
   t.CatKey,
   d.ID_Supplier,
   t.ID_Dept,
   t.DateAdded,
   t.RstkMin AS QtyMin_Rstk,
   t.Notes,
   t.Supplier_CatNum AS Supp_CatNum
 FROM cat_titles AS t LEFT JOIN qryCat_Depts AS d ON t.ID_Dept=d.ID;</mysql>

<section end=sql />