VbzCart/procs/Upd Titles fr Depts

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | procs
Revision as of 19:38, 8 March 2009 by Woozle (talk | contribs) (New page: ==About== * '''Purpose''': Fills {{vbzcart|table|_titles}} ==SQL== <section begin=sql /><mysql> CREATE PROCEDURE Upd_Titles_fr_Depts() REPLACE INTO _titles(ID,ID_Supp,CatNum,CatWeb) ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

SQL

<mysql> CREATE PROCEDURE Upd_Titles_fr_Depts()

   REPLACE INTO _titles(ID,ID_Supp,CatNum,CatWeb)
   SELECT
     t.ID,
     d.ID_Supp,
     UPPER(CONCAT_WS("-",d.CatNum,t.CatKey)) AS CatNum,
     LOWER(CONCAT_WS("/",d.CatWeb_Title,t.CatKey)) AS CatWeb
   FROM titles AS t LEFT JOIN _depts AS d ON t.ID_dept=d.ID
   ORDER BY CatNum;</mysql>