VbzCart/procs/Upd Titles fr Depts
Jump to navigation
Jump to search
About
- Purpose: Fills _titles
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>