Fix [2823371] - Deleting official unused Elements in Synchronize Terminology

https://sourceforge.net/tracker/?func=detail&aid=2823371&group_id=176962&atid=879332
This commit is contained in:
Carlos Ruiz 2009-07-17 22:54:20 +00:00
parent ea46b2ba52
commit af64f4c5d7
3 changed files with 3 additions and 3 deletions

View File

@ -131,7 +131,7 @@ public class SynchronizeTerminology extends SvrProcess
log.info(" rows deleted: "+no);
sql="DELETE AD_ELEMENT e"
+" WHERE NOT EXISTS"
+" WHERE AD_Element_ID >= 1000000 AND NOT EXISTS"
+" (SELECT 1 FROM AD_COLUMN c WHERE UPPER(e.ColumnName)=UPPER(c.ColumnName))"
+" AND NOT EXISTS"
+" (SELECT 1 FROM AD_PROCESS_PARA p WHERE UPPER(e.ColumnName)=UPPER(p.ColumnName))";

View File

@ -54,7 +54,7 @@ DELETE AD_ELEMENT_TRL
UPPER (p.columnname)));
DELETE AD_ELEMENT e
WHERE NOT EXISTS (SELECT 1
WHERE AD_Element_ID >= 1000000 AND NOT EXISTS (SELECT 1
FROM AD_COLUMN c
WHERE UPPER (e.columnname) = UPPER (c.columnname))
AND NOT EXISTS (SELECT 1

View File

@ -54,7 +54,7 @@ DELETE FROM AD_ELEMENT_TRL
UPPER (p.columnname)));
DELETE FROM AD_ELEMENT
WHERE NOT EXISTS (SELECT 1
WHERE AD_Element_ID >= 1000000 AND NOT EXISTS (SELECT 1
FROM AD_COLUMN c
WHERE UPPER (AD_ELEMENT.columnname) = UPPER (c.columnname))
AND NOT EXISTS (SELECT 1