Difference between revisions of "VbzCart/queries/qryCat Titles"
Jump to navigation
Jump to search
(moved from single-page listing) |
(changing CatKey_Title back to CatKey) |
||
Line 2: | Line 2: | ||
* '''Requires''': [[../../tables/cat_titles|cat_titles]], [[../qryCat_Depts|qryCat_Depts]] | * '''Requires''': [[../../tables/cat_titles|cat_titles]], [[../qryCat_Depts|qryCat_Depts]] | ||
* '''Fields''': | * '''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 | ||
==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 10: | Line 12: | ||
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 | + | t.CatKey, |
d.ID_Supplier, | d.ID_Supplier, | ||
t.ID_Dept, | t.ID_Dept, |
Revision as of 22:04, 6 November 2010
Details
- Requires: cat_titles, qryCat_Depts
- 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
SQL
<mysql>CREATE OR REPLACE VIEW qryCat_Titles AS
SELECT t.ID, t.Name, 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>