IDEMPIERE-3862 ORACLE - Update datatype NVARCHAR2 to VARCHAR2 (#207)
There are two scripts in this commit: * 202008040100_IDEMPIERE-3862.sql - updates the whole core as of today, changing the columns VARCHAR2...BYTE and NVARCHAR2 to VARCHAR2...CHAR * 202008040114_IDEMPIERE-3862.sql - updates the non-core tables, same algorithm, the first script was generated using this second for the core ** in case somebody doesn't want the second script to run on their database can simply change the line 39 to ->dryrun varchar2(1) := 'Y';
This commit is contained in:
parent
99c8d11f96
commit
24e9fe8402
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,384 @@
|
|||
-- IDEMPIERE-3862 ORACLE - Update datatype NVARCHAR2 to VARCHAR2
|
||||
|
||||
-- Script to change non-core tables and columns
|
||||
-- NOTE: if you prefer to do it manually:
|
||||
--- * change the dryrun variable to Y
|
||||
-- * capture the output of running this script in a file and edit it
|
||||
-- * verify and execute
|
||||
|
||||
SET ECHO OFF
|
||||
SET SERVEROUTPUT ON SIZE 1000000
|
||||
SET PAGESIZE 999
|
||||
SET LINESIZE 32000
|
||||
|
||||
/* replace all NVARCHAR2 and VARCHAR2...BYTE columns to VARCHAR2...CHAR */
|
||||
DECLARE
|
||||
old_table varchar2(128) := '^';
|
||||
old_idx varchar2(128) := '^';
|
||||
sql_drp_idxs varchar2(32767) := ''; -- drop indexes
|
||||
sql_cre_idxs varchar2(32767) := ''; -- create indexes
|
||||
sql_cre_comma varchar2(1) := ''; -- create indexes
|
||||
sql_cre_close varchar2(14) := ');';
|
||||
sql_add_cols varchar2(4000) := ''; -- add tmp columns
|
||||
sql_nul_cols varchar2(4000) := ''; -- make columns nullable
|
||||
sql_upd_cols varchar2(4000) := ''; -- update tmp=old, old=null
|
||||
sql_mod_cols varchar2(4000) := ''; -- make all columns varchar2
|
||||
sql_upb_cols varchar2(4000) := ''; -- update back old=tmp (restore)
|
||||
sql_nnl_cols varchar2(4000) := ''; -- make back columns not null
|
||||
sql_drp_cols varchar2(4000) := ''; -- drop tmp columns
|
||||
sql_add_comma varchar2(4000) := '';
|
||||
sql_nul_comma varchar2(4000) := '';
|
||||
sql_upd_comma varchar2(4000) := '';
|
||||
sql_mod_comma varchar2(4000) := '';
|
||||
sql_upb_comma varchar2(4000) := '';
|
||||
sql_nnl_comma varchar2(4000) := '';
|
||||
sql_drp_comma varchar2(4000) := '';
|
||||
sql_com_view varchar2(4000) := '';
|
||||
idx integer;
|
||||
tmpcolname varchar2(128);
|
||||
dryrun varchar2(1) := 'N'; -- change this to 'Y' to generate the script to execute, 'N' to execute immediate
|
||||
BEGIN
|
||||
|
||||
DBMS_OUTPUT.put_line(chr(10)||'-- Dropping functional based indexes and indexes unique where one of the columns to be modified is part');
|
||||
FOR i IN (
|
||||
SELECT ui.table_name, ui.index_name, ui.uniqueness, ui.index_type, uic.column_position, uic.column_name, uie.column_expression, uic.descend, uc.constraint_type
|
||||
FROM user_indexes ui
|
||||
JOIN user_ind_columns uic ON (ui.index_name= uic.index_name)
|
||||
LEFT JOIN user_ind_expressions uie ON (ui.index_name=uie.index_name AND uic.column_position=uie.column_position)
|
||||
LEFT JOIN user_constraints uc ON (ui.index_name=uc.index_name)
|
||||
WHERE ui.index_name IN (
|
||||
SELECT ui.index_name
|
||||
FROM user_indexes ui
|
||||
JOIN user_ind_columns uic ON (ui.index_name= uic.index_name)
|
||||
WHERE EXISTS (
|
||||
SELECT 1
|
||||
FROM user_tab_columns utc
|
||||
WHERE data_type = 'NVARCHAR2'
|
||||
AND table_name IN (SELECT table_name FROM user_tables)
|
||||
AND utc.table_name=ui.table_name
|
||||
AND utc.column_name=uic.column_name
|
||||
)
|
||||
AND ui.uniqueness='UNIQUE'
|
||||
AND ui.index_name IN (SELECT index_name FROM user_ind_columns GROUP BY index_name HAVING count(*)>1)
|
||||
UNION
|
||||
SELECT ui.index_name
|
||||
FROM user_indexes ui
|
||||
JOIN user_ind_columns uic ON (ui.index_name= uic.index_name)
|
||||
WHERE EXISTS (
|
||||
SELECT 1
|
||||
FROM user_tab_columns utc
|
||||
WHERE (data_type = 'NVARCHAR2' OR (data_type='VARCHAR2' AND char_used='B'))
|
||||
AND table_name IN (SELECT table_name FROM user_tables)
|
||||
AND utc.table_name=ui.table_name
|
||||
)
|
||||
AND ui.index_type!='NORMAL'
|
||||
)
|
||||
ORDER BY ui.table_name, ui.index_name, uic.column_position
|
||||
) LOOP
|
||||
IF (old_idx = i.index_name)
|
||||
THEN
|
||||
/* new column in same index */
|
||||
sql_cre_comma := ',';
|
||||
ELSE
|
||||
/* This block is repeated exactly the same below, changes here must be done also there */
|
||||
IF (old_idx != '^')
|
||||
THEN
|
||||
/* close command */
|
||||
sql_cre_idxs := sql_cre_idxs || sql_cre_close;
|
||||
END IF;
|
||||
/* new index */
|
||||
old_idx := i.index_name;
|
||||
IF (i.constraint_type IN ('U','P'))
|
||||
THEN
|
||||
sql_drp_idxs := sql_drp_idxs || 'ALTER TABLE '||i.table_name||' DROP CONSTRAINT '||i.index_name||';';
|
||||
sql_cre_idxs := sql_cre_idxs || 'ALTER TABLE '||i.table_name||' ADD CONSTRAINT '||i.index_name||CASE WHEN i.constraint_type='U' THEN ' UNIQUE (' ELSE ' PRIMARY KEY (' END;
|
||||
sql_cre_close := ') USING INDEX;';
|
||||
ELSE
|
||||
sql_drp_idxs := sql_drp_idxs || 'DROP INDEX '||i.index_name||';';
|
||||
sql_cre_idxs := sql_cre_idxs || 'CREATE'||CASE WHEN i.uniqueness='UNIQUE' THEN ' UNIQUE' ELSE '' END||' INDEX '||i.index_name||' ON '||i.table_name||'(';
|
||||
sql_cre_close := ');';
|
||||
END IF;
|
||||
sql_cre_comma := '';
|
||||
END IF;
|
||||
sql_cre_idxs := sql_cre_idxs || sql_cre_comma || CASE WHEN i.column_expression IS NOT NULL THEN i.column_expression ELSE i.column_name END;
|
||||
END LOOP;
|
||||
/* This block is repeated exactly the same above, changes here must be done also there */
|
||||
IF (old_idx != '^')
|
||||
THEN
|
||||
/* close command */
|
||||
sql_cre_idxs := sql_cre_idxs || sql_cre_close;
|
||||
END IF;
|
||||
IF (sql_drp_idxs != ';')
|
||||
THEN
|
||||
FOR s IN (SELECT regexp_substr(sql_drp_idxs,'[^;]+', 1, level) AS cmd FROM DUAL
|
||||
CONNECT BY regexp_substr(sql_drp_idxs, '[^;]+', 1, level) is not null
|
||||
) LOOP
|
||||
DBMS_OUTPUT.put_line(s.cmd || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE s.cmd;
|
||||
END IF;
|
||||
END LOOP;
|
||||
END IF;
|
||||
|
||||
DBMS_OUTPUT.put_line(chr(10)||'-- Converting all VARCHAR2...BYTE to VARCHAR2..CHAR');
|
||||
old_table := '^';
|
||||
FOR c IN (
|
||||
SELECT table_name, column_name, data_type, char_length, char_used, nullable, data_default
|
||||
FROM user_tab_columns
|
||||
WHERE data_type = 'VARCHAR2' AND char_used='B'
|
||||
AND table_name IN (SELECT table_name FROM user_tables)
|
||||
-- AND table_name LIKE 'AD_CHART%' -- uncomment if you want to test with a smaller set of tables
|
||||
ORDER BY table_name, column_name
|
||||
) LOOP
|
||||
IF (old_table = c.table_name)
|
||||
THEN
|
||||
/* new column in same table */
|
||||
idx := idx + 1;
|
||||
sql_mod_comma := ',';
|
||||
ELSE
|
||||
/* This block is repeated exactly the same below, changes here must be done also there */
|
||||
IF (old_table != '^')
|
||||
THEN
|
||||
/* close and execute commands */
|
||||
sql_mod_cols := sql_mod_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_mod_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_mod_cols;
|
||||
END IF;
|
||||
END IF;
|
||||
/* new table */
|
||||
DBMS_OUTPUT.put_line(chr(10)||'-- Processing table ' || c.table_name);
|
||||
old_table := c.table_name;
|
||||
idx := 1;
|
||||
sql_mod_cols := 'ALTER TABLE '||c.table_name||' MODIFY (';
|
||||
sql_mod_comma := '';
|
||||
END IF;
|
||||
sql_mod_cols := sql_mod_cols || sql_mod_comma || c.column_name || ' VARCHAR2(' || c.char_length || ' CHAR)';
|
||||
END LOOP;
|
||||
/* This block is repeated exactly the same above, changes here must be done also there */
|
||||
IF (old_table != '^')
|
||||
THEN
|
||||
/* close and execute commands */
|
||||
sql_mod_cols := sql_mod_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_mod_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_mod_cols;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
DBMS_OUTPUT.put_line(chr(10)||'-- Converting all NVARCHAR2 to VARCHAR2..CHAR');
|
||||
old_table := '^';
|
||||
FOR c IN (
|
||||
SELECT table_name, column_name, data_type, char_length, char_used, nullable, data_default
|
||||
FROM user_tab_columns
|
||||
WHERE data_type = 'NVARCHAR2'
|
||||
AND table_name IN (SELECT table_name FROM user_tables)
|
||||
-- AND table_name LIKE 'A_ASSET_GR%' -- uncomment if you want to test with a smaller set of tables
|
||||
ORDER BY table_name, column_name
|
||||
) LOOP
|
||||
IF (old_table = c.table_name)
|
||||
THEN
|
||||
/* new column in same table */
|
||||
idx := idx + 1;
|
||||
sql_add_comma := ',';
|
||||
IF (sql_nul_cols NOT LIKE '%(' AND sql_nul_cols NOT LIKE '%,')
|
||||
THEN
|
||||
sql_nul_comma := ',';
|
||||
END IF;
|
||||
sql_upd_comma := ',';
|
||||
sql_mod_comma := ',';
|
||||
sql_upb_comma := ',';
|
||||
IF (sql_nnl_cols NOT LIKE '%(' AND sql_nnl_cols NOT LIKE '%,')
|
||||
THEN
|
||||
sql_nnl_comma := ',';
|
||||
END IF;
|
||||
sql_drp_comma := ',';
|
||||
ELSE
|
||||
/* This block is repeated exactly the same below, changes here must be done also there */
|
||||
IF (old_table != '^')
|
||||
THEN
|
||||
/* close and execute commands */
|
||||
sql_add_cols := sql_add_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_add_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_add_cols;
|
||||
END IF;
|
||||
IF (sql_nul_cols NOT LIKE '%(')
|
||||
THEN
|
||||
sql_nul_cols := sql_nul_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_nul_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_nul_cols;
|
||||
END IF;
|
||||
END IF;
|
||||
-- sql_upd_cols := sql_upd_cols;
|
||||
DBMS_OUTPUT.put_line(sql_upd_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_upd_cols;
|
||||
END IF;
|
||||
sql_mod_cols := sql_mod_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_mod_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_mod_cols;
|
||||
END IF;
|
||||
-- sql_upb_cols := sql_upb_cols;
|
||||
DBMS_OUTPUT.put_line(sql_upb_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_upb_cols;
|
||||
END IF;
|
||||
IF (sql_nnl_cols NOT LIKE '%(')
|
||||
THEN
|
||||
sql_nnl_cols := sql_nnl_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_nnl_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_nnl_cols;
|
||||
END IF;
|
||||
END IF;
|
||||
sql_drp_cols := sql_drp_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_drp_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_drp_cols;
|
||||
END IF;
|
||||
END IF;
|
||||
/* new table */
|
||||
DBMS_OUTPUT.put_line(chr(10)||'-- Processing table ' || c.table_name);
|
||||
old_table := c.table_name;
|
||||
idx := 1;
|
||||
sql_add_cols := 'ALTER TABLE '||c.table_name||' ADD (';
|
||||
sql_nul_cols := 'ALTER TABLE '||c.table_name||' MODIFY (';
|
||||
sql_upd_cols := 'UPDATE '||c.table_name||' SET ';
|
||||
sql_mod_cols := 'ALTER TABLE '||c.table_name||' MODIFY (';
|
||||
sql_upb_cols := 'UPDATE '||c.table_name||' SET ';
|
||||
sql_nnl_cols := 'ALTER TABLE '||c.table_name||' MODIFY (';
|
||||
sql_drp_cols := 'ALTER TABLE '||c.table_name||' DROP (';
|
||||
sql_add_comma := '';
|
||||
sql_nul_comma := '';
|
||||
sql_upd_comma := '';
|
||||
sql_mod_comma := '';
|
||||
sql_upb_comma := '';
|
||||
sql_nnl_comma := '';
|
||||
sql_drp_comma := '';
|
||||
END IF;
|
||||
tmpcolname := 'tmp_col_'||idx||'_tmp';
|
||||
sql_add_cols := sql_add_cols || sql_add_comma || tmpcolname || ' VARCHAR2(' || c.char_length || ' CHAR)';
|
||||
IF (c.nullable = 'N')
|
||||
THEN
|
||||
sql_nul_cols := sql_nul_cols || sql_nul_comma || c.column_name || ' ' || c.data_type || '(' || c.char_length || ') NULL';
|
||||
END IF;
|
||||
sql_upd_cols := sql_upd_cols || sql_upd_comma || tmpcolname || '=' || c.column_name || ',' || c.column_name || '=NULL';
|
||||
sql_mod_cols := sql_mod_cols || sql_mod_comma || c.column_name || ' VARCHAR2(' || c.char_length || ' CHAR)';
|
||||
IF (c.data_default IS NOT NULL AND c.data_default != 'NULL')
|
||||
THEN
|
||||
sql_mod_cols := sql_mod_cols || ' DEFAULT ' || c.data_default;
|
||||
END IF;
|
||||
sql_upb_cols := sql_upb_cols || sql_upb_comma || c.column_name || '=' || tmpcolname;
|
||||
IF (c.nullable = 'N')
|
||||
THEN
|
||||
sql_nnl_cols := sql_nnl_cols || sql_nnl_comma || c.column_name || ' VARCHAR2(' || c.char_length || ' CHAR)';
|
||||
IF (c.data_default IS NOT NULL AND c.data_default != 'NULL')
|
||||
THEN
|
||||
sql_nnl_cols := sql_nnl_cols || ' DEFAULT ' || c.data_default;
|
||||
END IF;
|
||||
sql_nnl_cols := sql_nnl_cols || ' NOT NULL';
|
||||
END IF;
|
||||
sql_drp_cols := sql_drp_cols || sql_drp_comma || tmpcolname;
|
||||
END LOOP;
|
||||
/* This block is repeated exactly the same above, changes here must be done also there */
|
||||
IF (old_table != '^')
|
||||
THEN
|
||||
/* close and execute commands */
|
||||
sql_add_cols := sql_add_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_add_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_add_cols;
|
||||
END IF;
|
||||
IF (sql_nul_cols NOT LIKE '%(')
|
||||
THEN
|
||||
sql_nul_cols := sql_nul_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_nul_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_nul_cols;
|
||||
END IF;
|
||||
END IF;
|
||||
-- sql_upd_cols := sql_upd_cols;
|
||||
DBMS_OUTPUT.put_line(sql_upd_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_upd_cols;
|
||||
END IF;
|
||||
sql_mod_cols := sql_mod_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_mod_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_mod_cols;
|
||||
END IF;
|
||||
-- sql_upb_cols := sql_upb_cols;
|
||||
DBMS_OUTPUT.put_line(sql_upb_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_upb_cols;
|
||||
END IF;
|
||||
IF (sql_nnl_cols NOT LIKE '%(')
|
||||
THEN
|
||||
sql_nnl_cols := sql_nnl_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_nnl_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_nnl_cols;
|
||||
END IF;
|
||||
END IF;
|
||||
sql_drp_cols := sql_drp_cols || ')';
|
||||
DBMS_OUTPUT.put_line(sql_drp_cols || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_drp_cols;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
DBMS_OUTPUT.put_line(chr(10)||'-- Recreating the dropped indexes');
|
||||
IF (sql_cre_idxs != ';')
|
||||
THEN
|
||||
FOR s IN (SELECT regexp_substr(sql_cre_idxs,'[^;]+', 1, level) AS cmd FROM DUAL
|
||||
CONNECT BY regexp_substr(sql_cre_idxs, '[^;]+', 1, level) is not null
|
||||
) LOOP
|
||||
DBMS_OUTPUT.put_line(s.cmd || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE s.cmd;
|
||||
END IF;
|
||||
END LOOP;
|
||||
END IF;
|
||||
|
||||
DBMS_OUTPUT.put_line(chr(10)||'-- Recompiling views affected');
|
||||
FOR c IN (
|
||||
SELECT DISTINCT table_name
|
||||
FROM user_tab_columns
|
||||
WHERE (data_type = 'NVARCHAR2' OR (data_type = 'VARCHAR2' AND char_used='B'))
|
||||
AND table_name IN (SELECT view_name FROM user_views)
|
||||
ORDER BY table_name
|
||||
) LOOP
|
||||
sql_com_view := 'ALTER VIEW '||c.table_name||' COMPILE';
|
||||
DBMS_OUTPUT.put_line(sql_com_view || ';');
|
||||
IF (dryrun != 'Y')
|
||||
THEN
|
||||
EXECUTE IMMEDIATE sql_com_view;
|
||||
END IF;
|
||||
END LOOP;
|
||||
|
||||
END;
|
||||
/
|
||||
|
||||
SELECT register_migration_script('202008040114_IDEMPIERE-3862.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,5 @@
|
|||
-- IDEMPIERE-3862 ORACLE - Update datatype NVARCHAR2 to VARCHAR2
|
||||
-- Placeholder - this script is just for oracle
|
||||
|
||||
SELECT register_migration_script('202008040100_IDEMPIERE-3862.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,6 @@
|
|||
-- IDEMPIERE-3862 ORACLE - Update datatype NVARCHAR2 to VARCHAR2
|
||||
-- Placeholder - this script is just for oracle
|
||||
|
||||
SELECT register_migration_script('202008040114_IDEMPIERE-3862.sql') FROM dual
|
||||
;
|
||||
|
|
@ -6,28 +6,28 @@ INSERT INTO AD_ELEMENT_TRL (AD_Element_ID, AD_LANGUAGE, AD_Client_ID, AD_Org_ID,
|
|||
UPDATE AD_COLUMN c SET AD_Element_id = (SELECT AD_Element_ID FROM AD_ELEMENT e WHERE UPPER(c.ColumnName)=UPPER(e.ColumnName)) WHERE AD_Element_ID IS NULL
|
||||
;
|
||||
|
||||
UPDATE AD_COLUMN c SET (ColumnName, Name, Description, Help, Placeholder) = (SELECT ColumnName, Name, Description, Help, Placeholder FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name OR COALESCE(c.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(c.Help,N' ') <> COALESCE(e.Help,N' ') OR COALESCE(c.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
|
||||
UPDATE AD_COLUMN c SET (ColumnName, Name, Description, Help, Placeholder) = (SELECT ColumnName, Name, Description, Help, Placeholder FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name OR COALESCE(c.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(c.Help,' ') <> COALESCE(e.Help,' ') OR COALESCE(c.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_INFOCOLUMN c SET (ColumnName, Name, Description, Help, Placeholder) = (SELECT ColumnName, Name, Description, Help, Placeholder FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID), Updated = SYSDATE WHERE c.IsCentrallyMaintained='Y' AND c.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name OR COALESCE(c.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(c.Help,N' ') <> COALESCE(e.Help,N' ') OR COALESCE(c.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
|
||||
UPDATE AD_INFOCOLUMN c SET (ColumnName, Name, Description, Help, Placeholder) = (SELECT ColumnName, Name, Description, Help, Placeholder FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID), Updated = SYSDATE WHERE c.IsCentrallyMaintained='Y' AND c.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name OR COALESCE(c.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(c.Help,' ') <> COALESCE(e.Help,' ') OR COALESCE(c.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_FIELD f SET (Name, Description, Help, Placeholder) = (SELECT e.Name, e.Description, e.Help, e.Placeholder FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (f.Name <> e.Name OR COALESCE(f.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(e.Help,N' ') OR COALESCE(f.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
|
||||
UPDATE AD_FIELD f SET (Name, Description, Help, Placeholder) = (SELECT e.Name, e.Description, e.Help, e.Placeholder FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (f.Name <> e.Name OR COALESCE(f.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(f.Help,' ') <> COALESCE(e.Help,' ') OR COALESCE(f.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_FIELD_TRL trl SET Name = (SELECT e.Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Description = (SELECT e.Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Help = (SELECT e.Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND trl.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> e.Name OR COALESCE(trl.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(trl.Help,N' ') <> COALESCE(e.Help,N' ')))
|
||||
UPDATE AD_FIELD_TRL trl SET Name = (SELECT e.Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Description = (SELECT e.Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Help = (SELECT e.Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND trl.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> e.Name OR COALESCE(trl.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(trl.Help,' ') <> COALESCE(e.Help,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_FIELD f SET Name = (SELECT e.PO_Name FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Description = (SELECT e.PO_Description FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Help = (SELECT e.PO_Help FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (f.Name <> e.PO_Name OR COALESCE(f.Description,N' ') <> COALESCE(e.PO_Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(e.PO_Help,N' ')) AND e.PO_Name IS NOT NULL) AND EXISTS (SELECT 1 FROM AD_TAB t, AD_WINDOW w WHERE f.AD_Tab_ID=t.AD_Tab_ID AND t.AD_Window_ID=w.AD_Window_ID AND w.IsSOTrx='N')
|
||||
UPDATE AD_FIELD f SET Name = (SELECT e.PO_Name FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Description = (SELECT e.PO_Description FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Help = (SELECT e.PO_Help FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (f.Name <> e.PO_Name OR COALESCE(f.Description,' ') <> COALESCE(e.PO_Description,' ') OR COALESCE(f.Help,' ') <> COALESCE(e.PO_Help,' ')) AND e.PO_Name IS NOT NULL) AND EXISTS (SELECT 1 FROM AD_TAB t, AD_WINDOW w WHERE f.AD_Tab_ID=t.AD_Tab_ID AND t.AD_Window_ID=w.AD_Window_ID AND w.IsSOTrx='N')
|
||||
;
|
||||
|
||||
UPDATE AD_FIELD_TRL trl SET Name = (SELECT e.PO_Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Description = (SELECT e.PO_Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Help = (SELECT e.PO_Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND trl.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> e.PO_Name OR COALESCE(trl.Description,N' ') <> COALESCE(e.PO_Description,N' ') OR COALESCE(trl.Help,N' ') <> COALESCE(e.PO_Help,N' ')) AND e.PO_Name IS NOT NULL) AND EXISTS (SELECT 1 FROM AD_FIELD f, AD_TAB t, AD_WINDOW w WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Tab_ID=t.AD_Tab_ID AND t.AD_Window_ID=w.AD_Window_ID AND w.IsSOTrx='N')
|
||||
UPDATE AD_FIELD_TRL trl SET Name = (SELECT e.PO_Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Description = (SELECT e.PO_Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Help = (SELECT e.PO_Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND trl.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> e.PO_Name OR COALESCE(trl.Description,' ') <> COALESCE(e.PO_Description,' ') OR COALESCE(trl.Help,' ') <> COALESCE(e.PO_Help,' ')) AND e.PO_Name IS NOT NULL) AND EXISTS (SELECT 1 FROM AD_FIELD f, AD_TAB t, AD_WINDOW w WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Tab_ID=t.AD_Tab_ID AND t.AD_Window_ID=w.AD_Window_ID AND w.IsSOTrx='N')
|
||||
;
|
||||
|
||||
UPDATE AD_FIELD f SET Name = (SELECT p.Name FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Description = (SELECT p.Description FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Help = (SELECT p.Help FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_PROCESS p, AD_COLUMN c WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID AND (f.Name<>p.Name OR COALESCE(f.Description,N' ')<>COALESCE(p.Description,N' ') OR COALESCE(f.Help,N' ')<>COALESCE(p.Help,N' ')))
|
||||
UPDATE AD_FIELD f SET Name = (SELECT p.Name FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Description = (SELECT p.Description FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Help = (SELECT p.Help FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_PROCESS p, AD_COLUMN c WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID AND (f.Name<>p.Name OR COALESCE(f.Description,' ')<>COALESCE(p.Description,' ') OR COALESCE(f.Help,' ')<>COALESCE(p.Help,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_FIELD_TRL trl SET Name = (SELECT p.Name FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Description = (SELECT p.Description FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Help = (SELECT p.Help FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), IsTranslated = (SELECT p.IsTranslated FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name<>p.Name OR COALESCE(trl.Description,N' ')<>COALESCE(p.Description,N' ') OR COALESCE(trl.Help,N' ')<>COALESCE(p.Help,N' ')))
|
||||
UPDATE AD_FIELD_TRL trl SET Name = (SELECT p.Name FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Description = (SELECT p.Description FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Help = (SELECT p.Help FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), IsTranslated = (SELECT p.IsTranslated FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name<>p.Name OR COALESCE(trl.Description,' ')<>COALESCE(p.Description,' ') OR COALESCE(trl.Help,' ')<>COALESCE(p.Help,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_PROCESS_PARA f SET ColumnName = (SELECT e.ColumnName FROM AD_ELEMENT e WHERE UPPER(e.ColumnName)=UPPER(f.ColumnName)) WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE UPPER(e.ColumnName)=UPPER(f.ColumnName) AND e.ColumnName<>f.ColumnName)
|
||||
|
@ -36,31 +36,31 @@ UPDATE AD_PROCESS_PARA f SET ColumnName = (SELECT e.ColumnName FROM AD_ELEMENT e
|
|||
UPDATE AD_PROCESS_PARA p SET IsCentrallyMaintained = 'N' WHERE IsCentrallyMaintained <> 'N' AND NOT EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE p.ColumnName=e.ColumnName)
|
||||
;
|
||||
|
||||
UPDATE AD_PROCESS_PARA f SET Name = (SELECT e.Name FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Description = (SELECT e.Description FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Help = (SELECT e.Help FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName AND (f.Name <> e.Name OR COALESCE(f.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(e.Help,N' ') OR COALESCE(f.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
|
||||
UPDATE AD_PROCESS_PARA f SET Name = (SELECT e.Name FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Description = (SELECT e.Description FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Help = (SELECT e.Help FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName AND (f.Name <> e.Name OR COALESCE(f.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(f.Help,' ') <> COALESCE(e.Help,' ') OR COALESCE(f.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_PROCESS_PARA_TRL trl SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> et.Name OR COALESCE(trl.Description,N' ') <> COALESCE(et.Description,N' ') OR COALESCE(trl.Help,N' ') <> COALESCE(et.Help,N' ') OR COALESCE(trl.Placeholder,N' ') <> COALESCE(et.Placeholder,N' ')))
|
||||
UPDATE AD_PROCESS_PARA_TRL trl SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> et.Name OR COALESCE(trl.Description,' ') <> COALESCE(et.Description,' ') OR COALESCE(trl.Help,' ') <> COALESCE(et.Help,' ') OR COALESCE(trl.Placeholder,' ') <> COALESCE(et.Placeholder,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_INFOCOLUMN_TRL trl SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> et.Name OR COALESCE(trl.Description,N' ') <> COALESCE(et.Description,N' ') OR COALESCE(trl.Help,N' ') <> COALESCE(et.Help,N' ') OR COALESCE(trl.Placeholder,N' ') <> COALESCE(et.Placeholder,N' ')))
|
||||
UPDATE AD_INFOCOLUMN_TRL trl SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> et.Name OR COALESCE(trl.Description,' ') <> COALESCE(et.Description,' ') OR COALESCE(trl.Help,' ') <> COALESCE(et.Help,' ') OR COALESCE(trl.Placeholder,' ') <> COALESCE(et.Placeholder,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_WF_NODE n SET Name = (SELECT w.Name FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID), Description = (SELECT w.Description FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID), Help = (SELECT w.Help FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID AND (w.Name <> n.Name OR COALESCE(w.Description,N' ') <> COALESCE(n.Description,N' ') OR COALESCE(w.Help,N' ') <> COALESCE(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
|
||||
UPDATE AD_WF_NODE n SET Name = (SELECT w.Name FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID), Description = (SELECT w.Description FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID), Help = (SELECT w.Help FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID AND (w.Name <> n.Name OR COALESCE(w.Description,' ') <> COALESCE(n.Description,' ') OR COALESCE(w.Help,' ') <> COALESCE(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_WF_NODE_TRL trl SET Name = (SELECT t.Name FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE), Description = (SELECT t.Description FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE), Help = (SELECT t.Help FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR COALESCE(trl.Description,N' ') <> COALESCE(t.Description,N' ') OR COALESCE(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> COALESCE(t.Help,N' ')))
|
||||
UPDATE AD_WF_NODE_TRL trl SET Name = (SELECT t.Name FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE), Description = (SELECT t.Description FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE), Help = (SELECT t.Help FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR COALESCE(trl.Description,' ') <> COALESCE(t.Description,' ') OR COALESCE(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> COALESCE(t.Help,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_WF_NODE n SET (Name, Description, Help) = (SELECT f.Name, f.Description, f.Help FROM AD_FORM f WHERE f.AD_Form_ID=n.AD_Form_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_FORM f WHERE f.AD_Form_ID=n.AD_Form_ID AND (f.Name <> n.Name OR COALESCE(f.Description,N' ') <> COALESCE(n.Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
|
||||
UPDATE AD_WF_NODE n SET (Name, Description, Help) = (SELECT f.Name, f.Description, f.Help FROM AD_FORM f WHERE f.AD_Form_ID=n.AD_Form_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_FORM f WHERE f.AD_Form_ID=n.AD_Form_ID AND (f.Name <> n.Name OR COALESCE(f.Description,' ') <> COALESCE(n.Description,' ') OR COALESCE(f.Help,' ') <> COALESCE(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_WF_NODE_TRL trl SET (Name, Description, Help) = (SELECT t.Name, t.Description, t.Help FROM AD_FORM_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Form_ID=t.AD_Form_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_FORM_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Form_ID=t.AD_Form_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR COALESCE(trl.Description,N' ') <> COALESCE(t.Description,N' ') OR COALESCE(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> COALESCE(t.Help,N' ')))
|
||||
UPDATE AD_WF_NODE_TRL trl SET (Name, Description, Help) = (SELECT t.Name, t.Description, t.Help FROM AD_FORM_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Form_ID=t.AD_Form_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_FORM_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Form_ID=t.AD_Form_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR COALESCE(trl.Description,' ') <> COALESCE(t.Description,' ') OR COALESCE(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> COALESCE(t.Help,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_WF_NODE n SET (Name, Description, Help) = (SELECT f.Name, f.Description, f.Help FROM AD_PROCESS f WHERE f.AD_Process_ID=n.AD_Process_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_PROCESS f WHERE f.AD_Process_ID=n.AD_Process_ID AND (f.Name <> n.Name OR COALESCE(f.Description,N' ') <> COALESCE(n.Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
|
||||
UPDATE AD_WF_NODE n SET (Name, Description, Help) = (SELECT f.Name, f.Description, f.Help FROM AD_PROCESS f WHERE f.AD_Process_ID=n.AD_Process_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_PROCESS f WHERE f.AD_Process_ID=n.AD_Process_ID AND (f.Name <> n.Name OR COALESCE(f.Description,' ') <> COALESCE(n.Description,' ') OR COALESCE(f.Help,' ') <> COALESCE(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_WF_NODE_TRL trl SET (Name, Description, Help) = (SELECT t.Name, t.Description, t.Help FROM AD_PROCESS_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Process_ID=t.AD_Process_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_PROCESS_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Process_ID=t.AD_Process_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR COALESCE(trl.Description,N' ') <> COALESCE(t.Description,N' ') OR COALESCE(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> COALESCE(t.Help,N' ')))
|
||||
UPDATE AD_WF_NODE_TRL trl SET (Name, Description, Help) = (SELECT t.Name, t.Description, t.Help FROM AD_PROCESS_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Process_ID=t.AD_Process_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_PROCESS_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Process_ID=t.AD_Process_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR COALESCE(trl.Description,' ') <> COALESCE(t.Description,' ') OR COALESCE(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> COALESCE(t.Help,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_PRINTFORMATITEM pfi SET Name = (SELECT e.Name FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID) WHERE pfi.IsCentrallyMaintained='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID AND e.Name<>pfi.Name) AND EXISTS (SELECT 1 FROM AD_CLIENT WHERE AD_Client_ID=pfi.AD_Client_ID AND IsMultiLingualDocument='Y')
|
||||
|
@ -117,7 +117,7 @@ UPDATE AD_MENU m SET Name = (SELECT Name FROM AD_InfoWindow f WHERE m.AD_InfoWin
|
|||
UPDATE AD_MENU_TRL mt SET Name = (SELECT ft.Name FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE mt.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND mt.AD_LANGUAGE=ft.AD_LANGUAGE), Description = (SELECT ft.Description FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE mt.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND mt.AD_LANGUAGE=ft.AD_LANGUAGE), IsTranslated = (SELECT ft.IsTranslated FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE mt.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND mt.AD_LANGUAGE=ft.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE mt.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND mt.AD_LANGUAGE=ft.AD_LANGUAGE AND m.AD_InfoWindow_ID IS NOT NULL AND m.Action = 'I' AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y')
|
||||
;
|
||||
|
||||
UPDATE AD_COLUMN_TRL ct SET (Name, Placeholder) = (SELECT e.Name, e.Placeholder FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE ct.AD_Column_ID=c.AD_Column_ID AND ct.AD_LANGUAGE=e.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE ct.AD_Column_ID=c.AD_Column_ID AND ct.AD_LANGUAGE=e.AD_LANGUAGE AND (ct.Name<>e.Name OR COALESCE(ct.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
|
||||
UPDATE AD_COLUMN_TRL ct SET (Name, Placeholder) = (SELECT e.Name, e.Placeholder FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE ct.AD_Column_ID=c.AD_Column_ID AND ct.AD_LANGUAGE=e.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE ct.AD_Column_ID=c.AD_Column_ID AND ct.AD_LANGUAGE=e.AD_LANGUAGE AND (ct.Name<>e.Name OR COALESCE(ct.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
|
||||
;
|
||||
|
||||
UPDATE AD_TABLE t SET (Name,Description) = (SELECT e.Name,e.Description FROM AD_ELEMENT e WHERE t.TableName||'_ID'=e.ColumnName) WHERE EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE t.TableName||'_ID'=e.ColumnName AND t.Name<>e.Name)
|
||||
|
|
Loading…
Reference in New Issue