refactoring - uppercase reserved word INSERT

This commit is contained in:
Carlos Ruiz 2009-11-05 14:48:48 +00:00
parent 3e080a8836
commit e2a839bcfa
18 changed files with 36 additions and 36 deletions

View File

@ -212,7 +212,7 @@ public abstract class AbstractElementHandler implements ElementHandler {
else else
;//Ignore ;//Ignore
StringBuffer sqlB = new StringBuffer ("Insert INTO AD_Package_Imp_Backup") StringBuffer sqlB = new StringBuffer ("INSERT INTO AD_Package_Imp_Backup")
.append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " )
.append( "AD_PACKAGE_IMP_BACKUP_ID, AD_PACKAGE_IMP_DETAIL_ID, AD_PACKAGE_IMP_ID," ) .append( "AD_PACKAGE_IMP_BACKUP_ID, AD_PACKAGE_IMP_DETAIL_ID, AD_PACKAGE_IMP_ID," )
.append( " AD_TABLE_ID, AD_COLUMN_ID, AD_REFERENCE_ID, COLVALUE)" ) .append( " AD_TABLE_ID, AD_COLUMN_ID, AD_REFERENCE_ID, COLVALUE)" )

View File

@ -322,7 +322,7 @@ public class PackInHandler extends DefaultHandler {
AD_Package_Imp_ID = DB.getNextID (Env.getAD_Client_ID(m_ctx), "AD_Package_Imp", null); AD_Package_Imp_ID = DB.getNextID (Env.getAD_Client_ID(m_ctx), "AD_Package_Imp", null);
StringBuffer sqlB = new StringBuffer ("Insert INTO AD_Package_Imp") StringBuffer sqlB = new StringBuffer ("INSERT INTO AD_Package_Imp")
.append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " )
.append( "AD_PACKAGE_IMP_ID, RELEASENO, PK_VERSION, VERSION " ) .append( "AD_PACKAGE_IMP_ID, RELEASENO, PK_VERSION, VERSION " )
.append( ", DESCRIPTION, NAME, CREATOR" ) .append( ", DESCRIPTION, NAME, CREATOR" )
@ -353,7 +353,7 @@ public class PackInHandler extends DefaultHandler {
AD_Package_Imp_Inst_ID = DB.getNextID (Env.getAD_Client_ID(m_ctx), "AD_Package_Imp_Inst", null); AD_Package_Imp_Inst_ID = DB.getNextID (Env.getAD_Client_ID(m_ctx), "AD_Package_Imp_Inst", null);
//Insert Package into package install log //Insert Package into package install log
sqlB = new StringBuffer ("Insert INTO AD_Package_Imp_Inst") sqlB = new StringBuffer ("INSERT INTO AD_Package_Imp_Inst")
.append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " )
.append( "AD_PACKAGE_IMP_INST_ID, RELEASENO, PK_VERSION, VERSION " ) .append( "AD_PACKAGE_IMP_INST_ID, RELEASENO, PK_VERSION, VERSION " )
.append( ", DESCRIPTION, NAME, CREATOR" ) .append( ", DESCRIPTION, NAME, CREATOR" )

View File

@ -142,7 +142,7 @@ public class CodeSnipitElementHandler extends AbstractElementHandler {
} }
} }
//Record in transaction file //Record in transaction file
StringBuffer sqlB = new StringBuffer ("Insert INTO AD_Package_Imp_Backup") StringBuffer sqlB = new StringBuffer ("INSERT INTO AD_Package_Imp_Backup")
.append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " )
.append( "AD_PACKAGE_IMP_BACKUP_ID, AD_PACKAGE_IMP_DETAIL_ID, AD_PACKAGE_IMP_ID," ) .append( "AD_PACKAGE_IMP_BACKUP_ID, AD_PACKAGE_IMP_DETAIL_ID, AD_PACKAGE_IMP_ID," )
.append( " AD_PACKAGE_IMP_ORG_DIR, AD_PACKAGE_IMP_BCK_DIR)" ) .append( " AD_PACKAGE_IMP_ORG_DIR, AD_PACKAGE_IMP_BCK_DIR)" )

View File

@ -89,9 +89,9 @@ public class CommonTranslationHandler extends AbstractElementHandler implements
StringBuffer sql = new StringBuffer( StringBuffer sql = new StringBuffer(
"insert into "+parentTable+"_trl ("+parentTable+"_ID, "+ "INSERT INTO "+parentTable+"_trl ("+parentTable+"_ID, "+
" ad_client_ID, ad_org_id, CreatedBy, UpdatedBy, "+cast(pipoColumns)+ " ad_client_ID, ad_org_id, CreatedBy, UpdatedBy, "+cast(pipoColumns)+
") values ( ?, ?, ?, ?, ? "); ") VALUES ( ?, ?, ?, ?, ? ");
for (int i = 0; i<pipoColumns.size(); i++) { for (int i = 0; i<pipoColumns.size(); i++) {

View File

@ -154,7 +154,7 @@ public class DistFileElementHandler extends AbstractElementHandler {
} }
} }
//Record in transaction file //Record in transaction file
StringBuffer sqlB = new StringBuffer ("Insert INTO AD_Package_Imp_Backup" ) StringBuffer sqlB = new StringBuffer ("INSERT INTO AD_Package_Imp_Backup" )
.append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " )
.append( "AD_PACKAGE_IMP_BACKUP_ID, AD_PACKAGE_IMP_DETAIL_ID, AD_PACKAGE_IMP_ID," ) .append( "AD_PACKAGE_IMP_BACKUP_ID, AD_PACKAGE_IMP_DETAIL_ID, AD_PACKAGE_IMP_ID," )
.append( " AD_PACKAGE_IMP_ORG_DIR, AD_PACKAGE_IMP_BCK_DIR)" ) .append( " AD_PACKAGE_IMP_ORG_DIR, AD_PACKAGE_IMP_BCK_DIR)" )

View File

@ -73,7 +73,7 @@ public class FormAccessElementHandler extends AbstractElementHandler {
else{ else{
Object_Status = "New"; Object_Status = "New";
AD_Backup_ID =0; AD_Backup_ID =0;
sqlB = new StringBuffer ("Insert INTO AD_Form_Access" sqlB = new StringBuffer ("INSERT INTO AD_Form_Access"
+ "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " + "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, "
+ "AD_Role_ID, AD_Form_ID, isActive, isReadWrite) " + "AD_Role_ID, AD_Form_ID, isActive, isReadWrite) "
+ "VALUES(" + "VALUES("

View File

@ -206,7 +206,7 @@ public class MenuElementHandler extends AbstractElementHandler {
colValue = rs1.getObject(q).toString(); colValue = rs1.getObject(q).toString();
StringBuffer sqlD = new StringBuffer( StringBuffer sqlD = new StringBuffer(
"Insert INTO AD_Package_Imp_Backup" "INSERT INTO AD_Package_Imp_Backup"
+ "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " + "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, "
+ "AD_PACKAGE_IMP_BACKUP_ID, AD_PACKAGE_IMP_DETAIL_ID, AD_PACKAGE_IMP_ID," + "AD_PACKAGE_IMP_BACKUP_ID, AD_PACKAGE_IMP_DETAIL_ID, AD_PACKAGE_IMP_ID,"
+ " AD_TABLE_ID, AD_COLUMN_ID, AD_REFERENCE_ID, COLVALUE)" + " AD_TABLE_ID, AD_COLUMN_ID, AD_REFERENCE_ID, COLVALUE)"
@ -252,7 +252,7 @@ public class MenuElementHandler extends AbstractElementHandler {
" WHERE AD_Tree_ID = 10").append( " WHERE AD_Tree_ID = 10").append(
" AND Node_ID = " + m_Menu.getAD_Menu_ID()); " AND Node_ID = " + m_Menu.getAD_Menu_ID());
} else { } else {
sqlB = new StringBuffer("Insert INTO AD_TREENODEMM").append( sqlB = new StringBuffer("INSERT INTO AD_TREENODEMM").append(
"(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, ").append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, ").append(
"Parent_ID, SeqNo, AD_Tree_ID, Node_ID)").append( "Parent_ID, SeqNo, AD_Tree_ID, Node_ID)").append(
"VALUES(0, 0, 0, 0, ").append( "VALUES(0, 0, 0, 0, ").append(

View File

@ -69,7 +69,7 @@ public class OrgRoleElementHandler extends AbstractElementHandler {
else{ else{
Object_Status = "New"; Object_Status = "New";
AD_Backup_ID =0; AD_Backup_ID =0;
sqlB = new StringBuffer ("Insert INTO AD_Role_OrgAccess") sqlB = new StringBuffer ("INSERT INTO AD_Role_OrgAccess")
.append( "(AD_Client_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, CreatedBy, UpdatedBy, " )
.append( "AD_Role_ID, AD_Org_ID, isActive, isReadOnly) " ) .append( "AD_Role_ID, AD_Org_ID, isActive, isReadOnly) " )
.append( "VALUES(" ) .append( "VALUES(" )

View File

@ -74,7 +74,7 @@ public class ProcessAccessElementHandler extends AbstractElementHandler {
else{ else{
Object_Status = "New"; Object_Status = "New";
AD_Backup_ID =0; AD_Backup_ID =0;
sqlB = new StringBuffer ("Insert INTO AD_Process_Access") sqlB = new StringBuffer ("INSERT INTO AD_Process_Access")
.append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " )
.append( "AD_Role_ID, AD_Process_ID, isActive, isReadWrite) " ) .append( "AD_Role_ID, AD_Process_ID, isActive, isReadWrite) " )
.append( "VALUES(" ) .append( "VALUES(" )

View File

@ -167,7 +167,7 @@ public class ReferenceTableElementHandler extends AbstractElementHandler {
throw new POSaveFailedException("ReferenceTable"); throw new POSaveFailedException("ReferenceTable");
} }
} else { } else {
sqlB = new StringBuffer("Insert INTO AD_Ref_Table") sqlB = new StringBuffer("INSERT INTO AD_Ref_Table")
.append( .append(
"(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, ") "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, ")
.append( .append(

View File

@ -73,7 +73,7 @@ public class TaskAccessElementHandler extends AbstractElementHandler {
else{ else{
Object_Status = "New"; Object_Status = "New";
AD_Backup_ID =0; AD_Backup_ID =0;
sqlB = new StringBuffer ("Insert INTO AD_Task_Access") sqlB = new StringBuffer ("INSERT INTO AD_Task_Access")
.append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " )
.append( "AD_Role_ID, AD_Task_ID, isActive, isReadWrite) " ) .append( "AD_Role_ID, AD_Task_ID, isActive, isReadWrite) " )
.append( "VALUES(" ) .append( "VALUES(" )

View File

@ -80,7 +80,7 @@ public class UserRoleElementHandler extends AbstractElementHandler {
else{ else{
Object_Status = "New"; Object_Status = "New";
AD_Backup_ID =0; AD_Backup_ID =0;
sqlB = new StringBuffer ("Insert INTO AD_User_Roles") sqlB = new StringBuffer ("INSERT INTO AD_User_Roles")
.append( "(AD_Client_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, CreatedBy, UpdatedBy, " )
.append( "AD_User_ID, AD_Role_ID, AD_Org_ID, isActive) " ) .append( "AD_User_ID, AD_Role_ID, AD_Org_ID, isActive) " )
.append( "VALUES(" ) .append( "VALUES(" )

View File

@ -78,7 +78,7 @@ public class WindowAccessElementHandler extends AbstractElementHandler {
else{ else{
Object_Status = "New"; Object_Status = "New";
AD_Backup_ID =0; AD_Backup_ID =0;
sqlB = new StringBuffer ("Insert INTO AD_Window_Access") sqlB = new StringBuffer ("INSERT INTO AD_Window_Access")
.append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " )
.append( "AD_Role_ID, AD_Window_ID, isActive, isReadWrite) " ) .append( "AD_Role_ID, AD_Window_ID, isActive, isReadWrite) " )
.append( "VALUES(" ) .append( "VALUES(" )

View File

@ -73,7 +73,7 @@ public class WorkflowAccessElementHandler extends AbstractElementHandler {
else{ else{
Object_Status = "New"; Object_Status = "New";
AD_Backup_ID =0; AD_Backup_ID =0;
sqlB = new StringBuffer ("Insert INTO AD_Workflow_Access") sqlB = new StringBuffer ("INSERT INTO AD_Workflow_Access")
.append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " ) .append( "(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " )
.append( "AD_Role_ID, AD_Workflow_ID, isActive, isReadWrite) " ) .append( "AD_Role_ID, AD_Workflow_ID, isActive, isReadWrite) " )
.append( "VALUES(" ) .append( "VALUES(" )

View File

@ -1123,7 +1123,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
} }
DDL = "insert into t_alter_column values('"; DDL = "INSERT INTO t_alter_column values('";
String tableName = sqlStatement.substring(0, begin_col - action.length()); String tableName = sqlStatement.substring(0, begin_col - action.length());
tableName = tableName.toUpperCase().replaceAll("ALTER TABLE", ""); tableName = tableName.toUpperCase().replaceAll("ALTER TABLE", "");
tableName = tableName.trim().toLowerCase(); tableName = tableName.trim().toLowerCase();

View File

@ -97,25 +97,25 @@ public final class Convert_PostgreSQLTest extends TestCase{
public void testAlterColumn() { public void testAlterColumn() {
sql = "ALTER TABLE Test MODIFY T_Integer NUMBER(10) NOT NULL"; sql = "ALTER TABLE Test MODIFY T_Integer NUMBER(10) NOT NULL";
//sqe = "ALTER TABLE Test ALTER COLUMN T_Integer TYPE NUMERIC(10); ALTER TABLE Test ALTER COLUMN T_Integer SET NOT NULL;"; //sqe = "ALTER TABLE Test ALTER COLUMN T_Integer TYPE NUMERIC(10); ALTER TABLE Test ALTER COLUMN T_Integer SET NOT NULL;";
sqe = "insert into t_alter_column values('test','T_Integer','NUMERIC(10)','NOT NULL',null)"; sqe = "INSERT INTO t_alter_column values('test','T_Integer','NUMERIC(10)','NOT NULL',null)";
r = convert.convert(sql); r = convert.convert(sql);
assertEquals(sqe, r[0]); assertEquals(sqe, r[0]);
sql = "ALTER TABLE Test MODIFY T_Integer NUMBER(10) NULL"; sql = "ALTER TABLE Test MODIFY T_Integer NUMBER(10) NULL";
//sqe = "ALTER TABLE Test ALTER COLUMN T_Integer TYPE NUMERIC(10); ALTER TABLE Test ALTER COLUMN T_Integer DROP NOT NULL;"; //sqe = "ALTER TABLE Test ALTER COLUMN T_Integer TYPE NUMERIC(10); ALTER TABLE Test ALTER COLUMN T_Integer DROP NOT NULL;";
sqe = "insert into t_alter_column values('test','T_Integer','NUMERIC(10)','NULL',null)"; sqe = "INSERT INTO t_alter_column values('test','T_Integer','NUMERIC(10)','NULL',null)";
r = convert.convert(sql); r = convert.convert(sql);
assertEquals(sqe, r[0]); assertEquals(sqe, r[0]);
sql = "ALTER TABLE Test MODIFY T_Integer NOT NULL"; sql = "ALTER TABLE Test MODIFY T_Integer NOT NULL";
sqe = "insert into t_alter_column values('test','T_Integer',null,'NOT NULL',null)"; sqe = "INSERT INTO t_alter_column values('test','T_Integer',null,'NOT NULL',null)";
r = convert.convert(sql); r = convert.convert(sql);
assertEquals(sqe, r[0]); assertEquals(sqe, r[0]);
// Line 407 of ImportProduct.java // Line 407 of ImportProduct.java
sql = "ALTER TABLE LPI_Publication MODIFY AD_Client_ID NUMERIC(10) DEFAULT NULL"; sql = "ALTER TABLE LPI_Publication MODIFY AD_Client_ID NUMERIC(10) DEFAULT NULL";
//sqe = "ALTER TABLE LPI_Publication ALTER COLUMN AD_Client_ID TYPE NUMERIC(10); ALTER TABLE LPI_Publication ALTER COLUMN AD_Client_ID SET DEFAULT NULL; "; //sqe = "ALTER TABLE LPI_Publication ALTER COLUMN AD_Client_ID TYPE NUMERIC(10); ALTER TABLE LPI_Publication ALTER COLUMN AD_Client_ID SET DEFAULT NULL; ";
sqe = "insert into t_alter_column values('lpi_publication','AD_Client_ID','NUMERIC(10)',null,'NULL')"; sqe = "INSERT INTO t_alter_column values('lpi_publication','AD_Client_ID','NUMERIC(10)',null,'NULL')";
r = convert.convert(sql); r = convert.convert(sql);
assertEquals(sqe, r[0]); assertEquals(sqe, r[0]);
@ -127,17 +127,17 @@ public final class Convert_PostgreSQLTest extends TestCase{
//[ adempiere-Bugs-1746266 ] //[ adempiere-Bugs-1746266 ]
sql = "ALTER TABLE someTableName MODIFY someColumnName NVARCHAR2(64)"; sql = "ALTER TABLE someTableName MODIFY someColumnName NVARCHAR2(64)";
sqe = "insert into t_alter_column values('sometablename','someColumnName','VARCHAR(64)',null,null)"; sqe = "INSERT INTO t_alter_column values('sometablename','someColumnName','VARCHAR(64)',null,null)";
r = convert.convert(sql); r = convert.convert(sql);
assertEquals(sqe, r[0].trim()); assertEquals(sqe, r[0].trim());
sql = "ALTER TABLE S_Resource MODIFY IsActive CHAR(1) DEFAULT 'Y'"; sql = "ALTER TABLE S_Resource MODIFY IsActive CHAR(1) DEFAULT 'Y'";
sqe = "insert into t_alter_column values('s_resource','IsActive','CHAR(1)',null,'Y')"; sqe = "INSERT INTO t_alter_column values('s_resource','IsActive','CHAR(1)',null,'Y')";
r = convert.convert(sql); r = convert.convert(sql);
assertEquals(sqe, r[0].trim()); assertEquals(sqe, r[0].trim());
sql = "ALTER TABLE PP_Order_NodeNext MODIFY PP_Order_NodeNext_ID NULL"; sql = "ALTER TABLE PP_Order_NodeNext MODIFY PP_Order_NodeNext_ID NULL";
sqe = "insert into t_alter_column values('pp_order_nodenext','PP_Order_NodeNext_ID',null,'NULL',null)"; sqe = "INSERT INTO t_alter_column values('pp_order_nodenext','PP_Order_NodeNext_ID',null,'NULL',null)";
r = convert.convert(sql); r = convert.convert(sql);
assertEquals(sqe, r[0].trim()); assertEquals(sqe, r[0].trim());
} }

View File

@ -91,7 +91,7 @@ public class CopyRole extends SvrProcess
int no = DB.executeUpdateEx(sql, get_TrxName()); int no = DB.executeUpdateEx(sql, get_TrxName());
addLog(action++, null, new BigDecimal(no), "Old records deleted from " + table ); addLog(action++, null, new BigDecimal(no), "Old records deleted from " + table );
sql = "Insert INTO " + table sql = "INSERT INTO " + table
+ " (AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, " + " (AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, "
+ "AD_Role_ID, " + keycolumn +", isActive"; + "AD_Role_ID, " + keycolumn +", isActive";
if ( ! table.equals("AD_Document_Action_Access")) if ( ! table.equals("AD_Document_Action_Access"))

View File

@ -1819,32 +1819,32 @@ public class DBDifference {
.append("\n") .append("\n")
.append("-- INSERTING into PA_MEASURECALC \n") .append("-- INSERTING into PA_MEASURECALC \n")
.append( .append(
"Insert into PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (100,0,0,'Y',to_date('26.04.01','DD.MM.RR'),0,to_date('01.01.06','DD.MM.RR'),100,'Invoiced Net Revenue','Invoiced net revenue, without tax and charges','SELECT SUM(il.LineNetAmt) \n") "INSERT INTO PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (100,0,0,'Y',to_date('26.04.01','DD.MM.RR'),0,to_date('01.01.06','DD.MM.RR'),100,'Invoiced Net Revenue','Invoiced net revenue, without tax and charges','SELECT SUM(il.LineNetAmt) \n")
.append("FROM RV_C_Invoice C_Invoice\n") .append("FROM RV_C_Invoice C_Invoice\n")
.append( .append(
" INNER JOIN RV_C_InvoiceLine il ON (C_Invoice.C_Invoice_ID=il.C_Invoice_ID)','WHERE C_Invoice.IsSOTrx=''Y'' AND C_Invoice.Processed=''Y''','C_Invoice.DateInvoiced','C_Invoice.AD_Org_ID','C_Invoice.C_BPartner_ID','il.M_Product_ID',318,'C_Invoice.C_Invoice_ID','D');\n") " INNER JOIN RV_C_InvoiceLine il ON (C_Invoice.C_Invoice_ID=il.C_Invoice_ID)','WHERE C_Invoice.IsSOTrx=''Y'' AND C_Invoice.Processed=''Y''','C_Invoice.DateInvoiced','C_Invoice.AD_Org_ID','C_Invoice.C_BPartner_ID','il.M_Product_ID',318,'C_Invoice.C_Invoice_ID','D');\n")
.append( .append(
"Insert into PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (101,0,0,'Y',to_date('26.04.01','DD.MM.RR'),0,to_date('01.01.06','DD.MM.RR'),100,'Invoiced Gross Revenue','Invoice gross amount including tax; Does not allow selection by product (Category)','SELECT SUM(GrandTotal) \n") "INSERT INTO PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (101,0,0,'Y',to_date('26.04.01','DD.MM.RR'),0,to_date('01.01.06','DD.MM.RR'),100,'Invoiced Gross Revenue','Invoice gross amount including tax; Does not allow selection by product (Category)','SELECT SUM(GrandTotal) \n")
.append( .append(
"FROM RV_C_Invoice C_Invoice','WHERE IsSOTrx=''Y'' AND Processed=''Y''','DateInvoiced','AD_Org_ID','C_BPartner_ID',null,318,'C_Invoice_ID','D');\n") "FROM RV_C_Invoice C_Invoice','WHERE IsSOTrx=''Y'' AND Processed=''Y''','DateInvoiced','AD_Org_ID','C_BPartner_ID',null,318,'C_Invoice_ID','D');\n")
.append( .append(
"Insert into PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (102,0,0,'Y',to_date('26.04.01','DD.MM.RR'),0,to_date('01.01.06','DD.MM.RR'),100,'Invoiced Sales Margin','Difference between Limit and Actual price','SELECT SUM((il.PriceActual-il.PriceLimit)*QtyInvoiced) \n") "INSERT INTO PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (102,0,0,'Y',to_date('26.04.01','DD.MM.RR'),0,to_date('01.01.06','DD.MM.RR'),100,'Invoiced Sales Margin','Difference between Limit and Actual price','SELECT SUM((il.PriceActual-il.PriceLimit)*QtyInvoiced) \n")
.append("FROM RV_C_Invoice C_Invoice\n") .append("FROM RV_C_Invoice C_Invoice\n")
.append( .append(
" INNER JOIN RV_C_InvoiceLine il ON (C_Invoice.C_Invoice_ID=il.C_Invoice_ID)','WHERE C_Invoice.IsSOTrx=''Y'' AND C_Invoice.Processed=''Y''','C_Invoice.DateInvoiced','C_Invoice.AD_Org_ID','C_Invoice.C_BPartner_ID','il.M_Product_ID',318,'C_Invoice.C_Invoice_ID','D');\n") " INNER JOIN RV_C_InvoiceLine il ON (C_Invoice.C_Invoice_ID=il.C_Invoice_ID)','WHERE C_Invoice.IsSOTrx=''Y'' AND C_Invoice.Processed=''Y''','C_Invoice.DateInvoiced','C_Invoice.AD_Org_ID','C_Invoice.C_BPartner_ID','il.M_Product_ID',318,'C_Invoice.C_Invoice_ID','D');\n")
.append( .append(
"Insert into PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (103,0,0,'Y',to_date('26.04.01','DD.MM.RR'),0,to_date('25.12.05','DD.MM.RR'),100,'Number of Customers','Number of (new) customers','SELECT COUNT(*) \n") "INSERT INTO PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (103,0,0,'Y',to_date('26.04.01','DD.MM.RR'),0,to_date('25.12.05','DD.MM.RR'),100,'Number of Customers','Number of (new) customers','SELECT COUNT(*) \n")
.append( .append(
"FROM C_BPartner','WHERE IsCustomer=''Y''','Created','AD_Org_ID','C_BPartner_ID',null,291,'C_BPartner_ID','D');\n") "FROM C_BPartner','WHERE IsCustomer=''Y''','Created','AD_Org_ID','C_BPartner_ID',null,291,'C_BPartner_ID','D');\n")
.append( .append(
"Insert into PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (104,0,0,'Y',to_date('25.12.05','DD.MM.RR'),100,to_date('01.01.06','DD.MM.RR'),100,'Invoiced Paid Quantities','Invoiced paid quantities','SELECT SUM(il.QtyInvoiced) \n") "INSERT INTO PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (104,0,0,'Y',to_date('25.12.05','DD.MM.RR'),100,to_date('01.01.06','DD.MM.RR'),100,'Invoiced Paid Quantities','Invoiced paid quantities','SELECT SUM(il.QtyInvoiced) \n")
.append("FROM RV_C_Invoice C_Invoice\n") .append("FROM RV_C_Invoice C_Invoice\n")
.append( .append(
" INNER JOIN RV_C_InvoiceLine il ON (C_Invoice.C_Invoice_ID=il.C_Invoice_ID)','WHERE C_Invoice.IsSOTrx=''Y'' AND C_Invoice.Processed=''Y'' AND C_Invoice.IsPaid=''Y''\n") " INNER JOIN RV_C_InvoiceLine il ON (C_Invoice.C_Invoice_ID=il.C_Invoice_ID)','WHERE C_Invoice.IsSOTrx=''Y'' AND C_Invoice.Processed=''Y'' AND C_Invoice.IsPaid=''Y''\n")
.append( .append(
"','C_Invoice.DateInvoiced','C_Invoice.AD_Org_ID','C_Invoice.C_BPartner_ID','il.M_Product_ID',318,'C_Invoice.C_Invoice_ID','D');\n") "','C_Invoice.DateInvoiced','C_Invoice.AD_Org_ID','C_Invoice.C_BPartner_ID','il.M_Product_ID',318,'C_Invoice.C_Invoice_ID','D');\n")
.append( .append(
"Insert into PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (105,0,0,'Y',to_date('01.01.06','DD.MM.RR'),100,to_date('01.01.06','DD.MM.RR'),100,'Open Invoice Amount','Open Invoice Amount in Accounting Currency','SELECT COALESCE(SUM(currencyBase(invoiceOpen(C_Invoice_ID, C_InvoicePaySchedule_ID),C_Currency_ID, DateAcct, AD_Client_ID, AD_Org_ID)),0)\n") "INSERT INTO PA_MEASURECALC (PA_MEASURECALC_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,SELECTCLAUSE,WHERECLAUSE,DATECOLUMN,ORGCOLUMN,BPARTNERCOLUMN,PRODUCTCOLUMN,AD_TABLE_ID,KEYCOLUMN,ENTITYTYPE) values (105,0,0,'Y',to_date('01.01.06','DD.MM.RR'),100,to_date('01.01.06','DD.MM.RR'),100,'Open Invoice Amount','Open Invoice Amount in Accounting Currency','SELECT COALESCE(SUM(currencyBase(invoiceOpen(C_Invoice_ID, C_InvoicePaySchedule_ID),C_Currency_ID, DateAcct, AD_Client_ID, AD_Org_ID)),0)\n")
.append( .append(
"FROM C_Invoice_v C_Invoice','WHERE IsSOTrx=''Y'' AND Processed=''Y''','DateInvoiced','AD_Org_ID','C_BPartner_ID',null,318,'C_Invoice_ID','D');\n") "FROM C_Invoice_v C_Invoice','WHERE IsSOTrx=''Y'' AND Processed=''Y''','DateInvoiced','AD_Org_ID','C_BPartner_ID',null,318,'C_Invoice_ID','D');\n")
.append("\n") .append("\n")
@ -1870,13 +1870,13 @@ public class DBDifference {
.append(" \n") .append(" \n")
.append("-- INSERTING into PA_MEASURE \n") .append("-- INSERTING into PA_MEASURE \n")
.append( .append(
"Insert into PA_MEASURE (PA_MEASURE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,MEASURETYPE,MANUALACTUAL,MANUALNOTE,CALCULATIONCLASS,PA_MEASURECALC_ID,PA_BENCHMARK_ID,PA_RATIO_ID,PA_HIERARCHY_ID,MEASUREDATATYPE,R_REQUESTTYPE_ID,C_PROJECTTYPE_ID) values (102,11,0,'Y',to_date('01.01.06','DD.MM.RR'),100,to_date('01.01.06','DD.MM.RR'),100,'Open Invoice Amount',null,'C',0,null,null,105,null,null,null,'S',null,null);\n") "INSERT INTO PA_MEASURE (PA_MEASURE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,MEASURETYPE,MANUALACTUAL,MANUALNOTE,CALCULATIONCLASS,PA_MEASURECALC_ID,PA_BENCHMARK_ID,PA_RATIO_ID,PA_HIERARCHY_ID,MEASUREDATATYPE,R_REQUESTTYPE_ID,C_PROJECTTYPE_ID) values (102,11,0,'Y',to_date('01.01.06','DD.MM.RR'),100,to_date('01.01.06','DD.MM.RR'),100,'Open Invoice Amount',null,'C',0,null,null,105,null,null,null,'S',null,null);\n")
.append( .append(
"Insert into PA_MEASURE (PA_MEASURE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,MEASURETYPE,MANUALACTUAL,MANUALNOTE,CALCULATIONCLASS,PA_MEASURECALC_ID,PA_BENCHMARK_ID,PA_RATIO_ID,PA_HIERARCHY_ID,MEASUREDATATYPE,R_REQUESTTYPE_ID,C_PROJECTTYPE_ID) values (103,11,0,'Y',to_date('20.01.06','DD.MM.RR'),100,to_date('20.01.06','DD.MM.RR'),100,'Service Requests (Time)',null,'Q',0,null,null,null,null,null,null,'T',101,null);\n") "INSERT INTO PA_MEASURE (PA_MEASURE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,MEASURETYPE,MANUALACTUAL,MANUALNOTE,CALCULATIONCLASS,PA_MEASURECALC_ID,PA_BENCHMARK_ID,PA_RATIO_ID,PA_HIERARCHY_ID,MEASUREDATATYPE,R_REQUESTTYPE_ID,C_PROJECTTYPE_ID) values (103,11,0,'Y',to_date('20.01.06','DD.MM.RR'),100,to_date('20.01.06','DD.MM.RR'),100,'Service Requests (Time)',null,'Q',0,null,null,null,null,null,null,'T',101,null);\n")
.append( .append(
"Insert into PA_MEASURE (PA_MEASURE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,MEASURETYPE,MANUALACTUAL,MANUALNOTE,CALCULATIONCLASS,PA_MEASURECALC_ID,PA_BENCHMARK_ID,PA_RATIO_ID,PA_HIERARCHY_ID,MEASUREDATATYPE,R_REQUESTTYPE_ID,C_PROJECTTYPE_ID) values (104,11,0,'Y',to_date('20.01.06','DD.MM.RR'),100,to_date('20.01.06','DD.MM.RR'),100,'Service Requests (Status)',null,'Q',0,null,null,null,null,null,null,'S',101,null);\n") "INSERT INTO PA_MEASURE (PA_MEASURE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,MEASURETYPE,MANUALACTUAL,MANUALNOTE,CALCULATIONCLASS,PA_MEASURECALC_ID,PA_BENCHMARK_ID,PA_RATIO_ID,PA_HIERARCHY_ID,MEASUREDATATYPE,R_REQUESTTYPE_ID,C_PROJECTTYPE_ID) values (104,11,0,'Y',to_date('20.01.06','DD.MM.RR'),100,to_date('20.01.06','DD.MM.RR'),100,'Service Requests (Status)',null,'Q',0,null,null,null,null,null,null,'S',101,null);\n")
.append( .append(
"Insert into PA_MEASURE (PA_MEASURE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,MEASURETYPE,MANUALACTUAL,MANUALNOTE,CALCULATIONCLASS,PA_MEASURECALC_ID,PA_BENCHMARK_ID,PA_RATIO_ID,PA_HIERARCHY_ID,MEASUREDATATYPE,R_REQUESTTYPE_ID,C_PROJECTTYPE_ID) values (101,11,0,'Y',to_date('25.12.05','DD.MM.RR'),100,to_date('26.12.05','DD.MM.RR'),101,'Invoices Gross Revenue',null,'C',0,null,null,101,null,null,null,'T',null,null);\n") "INSERT INTO PA_MEASURE (PA_MEASURE_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,NAME,DESCRIPTION,MEASURETYPE,MANUALACTUAL,MANUALNOTE,CALCULATIONCLASS,PA_MEASURECALC_ID,PA_BENCHMARK_ID,PA_RATIO_ID,PA_HIERARCHY_ID,MEASUREDATATYPE,R_REQUESTTYPE_ID,C_PROJECTTYPE_ID) values (101,11,0,'Y',to_date('25.12.05','DD.MM.RR'),100,to_date('26.12.05','DD.MM.RR'),101,'Invoices Gross Revenue',null,'C',0,null,null,101,null,null,null,'T',null,null);\n")
.append("\n"); .append("\n");
return buffer.toString(); return buffer.toString();