VbzCart/docs/procs/Upd Titles fr Depts: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (fixed obsoleteness) |
m (Woozle moved page VbzCart/VbzCart/procs/Upd Titles fr Depts to VbzCart/docs/procs/Upd Titles fr Depts without leaving a redirect: part 2) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 6: | Line 6: | ||
*** Revised SQL to use "cat_titles" instead of "titles" (obsolete table which has been dropped). | *** Revised SQL to use "cat_titles" instead of "titles" (obsolete table which has been dropped). | ||
*** Added "DROP PROCEDURE" line for easier maintenance. | *** Added "DROP PROCEDURE" line for easier maintenance. | ||
*** Created | *** Created in database (none of the procs had been ported from L48 to Rizzo). | ||
==SQL== | ==SQL== | ||
<mysql>DROP PROCEDURE IF EXISTS Upd_Titles_fr_Depts; | |||
CREATE PROCEDURE Upd_Titles_fr_Depts() | CREATE PROCEDURE Upd_Titles_fr_Depts() | ||
REPLACE INTO _titles(ID,ID_Supp,CatNum,CatWeb) | REPLACE INTO _titles(ID,ID_Supp,CatNum,CatWeb) | ||
Line 18: | Line 19: | ||
FROM cat_titles AS t LEFT JOIN _depts AS d ON t.ID_dept=d.ID | FROM cat_titles AS t LEFT JOIN _depts AS d ON t.ID_dept=d.ID | ||
ORDER BY CatNum;</mysql> | ORDER BY CatNum;</mysql> | ||
Latest revision as of 01:55, 25 February 2024
About
- Input: Template:Vbzcart, Template:Vbzcart
- Output: Template:Vbzcart
- History:
- 2010-11-10
- Revised SQL to use "cat_titles" instead of "titles" (obsolete table which has been dropped).
- Added "DROP PROCEDURE" line for easier maintenance.
- Created in database (none of the procs had been ported from L48 to Rizzo).
- 2010-11-10
SQL
<mysql>DROP PROCEDURE IF EXISTS Upd_Titles_fr_Depts; 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 cat_titles AS t LEFT JOIN _depts AS d ON t.ID_dept=d.ID ORDER BY CatNum;</mysql>