Fix sql errors in Posterita migration script.

Most of the errors were attempts to add column which already exist.
This fix is mostly cleanup to avoid errors in the log file.
This commit is contained in:
trifonnt 2008-11-22 11:29:10 +00:00
parent c6012ade72
commit b477270f2b
4 changed files with 0 additions and 121 deletions

View File

@ -329,22 +329,6 @@ INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52032 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=52032 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
; ;
-- Jun 2, 2008 9:33:15 PM GMT+04:00
-- Default comment for updating dictionary
INSERT INTO AD_Reference (
AD_Client_ID,AD_Org_ID
,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive
,Name,Updated,UpdatedBy,ValidationType
) VALUES (
0,0
,53283,TO_DATE('2008-06-02 21:33:15','YYYY-MM-DD HH24:MI:SS'),100,'A','Y'
,'C_BankAccount',TO_DATE('2008-06-02 21:33:15','YYYY-MM-DD HH24:MI:SS'),100,'T')
;
-- Jun 2, 2008 9:33:15 PM GMT+04:00
-- Default comment for updating dictionary
INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=53283 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID)
;
-- Nov 6, 2008 9:02:15 AM EET -- Nov 6, 2008 9:02:15 AM EET
-- Posterita Integration -- Posterita Integration
@ -1322,9 +1306,6 @@ ALTER TABLE C_Payment
ADD CONSTRAINT C_Payment__C_CashBo_C_CashBook ADD CONSTRAINT C_Payment__C_CashBo_C_CashBook
FOREIGN KEY(C_CashBook_ID) REFERENCES C_CashBook(C_CashBook_ID); FOREIGN KEY(C_CashBook_ID) REFERENCES C_CashBook(C_CashBook_ID);
--------------------------------------------------------------------------------
ALTER TABLE C_CashLine
ADD C_Payment_ID NUMBER(10);
--- Migration scripts ---------------------------------------------------------- --- Migration scripts ----------------------------------------------------------
-- Aug 26, 2008 11:49:31 AM MUT -- Aug 26, 2008 11:49:31 AM MUT

View File

@ -1,49 +0,0 @@
-- 2008-10-21 11:47:06 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56366,52038,0,18,53283,52004,'Card_BankAccount_ID',TO_DATE('2008-10-21 11:47:05','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which card transactions will be processed','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Card Bank Account',0,TO_DATE('2008-10-21 11:47:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 11:47:06 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56366 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 2008-10-21 11:51:11 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56367,52039,0,18,53283,52004,'CardTransferBankAccount_ID',TO_DATE('2008-10-21 11:51:10','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Card transactions','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Transfer Card trx to',0,TO_DATE('2008-10-21 11:51:10','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 11:51:11 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56367 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 2008-10-21 12:01:37 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56368,52032,0,18,53283,52004,'CashTransferBankAccount_ID',TO_DATE('2008-10-21 12:01:37','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which to transfer all Cash transactions','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Transfer Cash trx to',0,TO_DATE('2008-10-21 12:01:37','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 12:01:37 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56368 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 2008-10-21 12:03:17 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56369,52035,0,18,53283,52004,'Check_BankAccount_ID',TO_DATE('2008-10-21 12:03:17','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account to be used for processing Check transactions','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Check Bank Account',0,TO_DATE('2008-10-21 12:03:17','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 12:03:18 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56369 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 2008-10-21 12:13:00 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56370,52036,0,18,53283,52004,'CheckTransferBankAccount_ID',TO_DATE('2008-10-21 12:12:57','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Check transactions','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Tranfer Check trx to',0,TO_DATE('2008-10-21 12:12:57','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 12:13:00 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56370 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;

View File

@ -1276,9 +1276,6 @@ ALTER TABLE C_Payment
ADD CONSTRAINT C_Payment__C_CashBo_C_CashBook ADD CONSTRAINT C_Payment__C_CashBo_C_CashBook
FOREIGN KEY(C_CashBook_ID) REFERENCES C_CashBook(C_CashBook_ID); FOREIGN KEY(C_CashBook_ID) REFERENCES C_CashBook(C_CashBook_ID);
--------------------------------------------------------------------------------
ALTER TABLE C_CashLine
ADD C_Payment_ID NUMERIC(10);
--- Migration scripts ---------------------------------------------------------- --- Migration scripts ----------------------------------------------------------
-- Aug 26, 2008 11:49:31 AM MUT -- Aug 26, 2008 11:49:31 AM MUT

View File

@ -1,50 +0,0 @@
-- 2008-10-21 11:47:06 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56366,52038,0,18,53283,52004,'Card_BankAccount_ID',TO_TIMESTAMP('2008-10-21 11:47:05','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which card transactions will be processed','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Card Bank Account',0,TO_TIMESTAMP('2008-10-21 11:47:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 11:47:06 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56366 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 2008-10-21 11:51:11 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56367,52039,0,18,53283,52004,'CardTransferBankAccount_ID',TO_TIMESTAMP('2008-10-21 11:51:10','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Card transactions','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Transfer Card trx to',0,TO_TIMESTAMP('2008-10-21 11:51:10','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 11:51:11 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56367 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 2008-10-21 12:01:37 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56368,52032,0,18,53283,52004,'CashTransferBankAccount_ID',TO_TIMESTAMP('2008-10-21 12:01:37','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account on which to transfer all Cash transactions','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Transfer Cash trx to',0,TO_TIMESTAMP('2008-10-21 12:01:37','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 12:01:37 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56368 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 2008-10-21 12:03:17 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56369,52035,0,18,53283,52004,'Check_BankAccount_ID',TO_TIMESTAMP('2008-10-21 12:03:17','YYYY-MM-DD HH24:MI:SS'),100,'Bank Account to be used for processing Check transactions','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Check Bank Account',0,TO_TIMESTAMP('2008-10-21 12:03:17','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 12:03:18 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56369 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 2008-10-21 12:13:00 EEST
-- Posterita intergation
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56370,52036,0,18,53283,52004,'CheckTransferBankAccount_ID',TO_TIMESTAMP('2008-10-21 12:12:57','YYYY-MM-DD HH24:MI:SS'),100,'Bank account on which to transfer Check transactions','C',10,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Tranfer Check trx to',0,TO_TIMESTAMP('2008-10-21 12:12:57','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- 2008-10-21 12:13:00 EEST
-- Posterita intergation
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56370 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;