IDEMPIERE-4176 Replace DELETE with DELETE FROM

This commit is contained in:
hengsin 2020-02-19 10:46:23 +08:00
parent 444ade9162
commit c388716835
41 changed files with 53 additions and 53 deletions

View File

@ -103,7 +103,7 @@ public class ImportPriceList extends SvrProcess
// Delete Old Imported
if (m_deleteOldImported)
{
sql = new StringBuilder("DELETE I_PriceList "
sql = new StringBuilder("DELETE FROM I_PriceList "
+ "WHERE I_IsImported='Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.INFO)) log.info("Delete Old Impored =" + no);

View File

@ -132,7 +132,7 @@ public class DocumentTypeVerify extends SvrProcess
if (s_log.isLoggable(Level.INFO)) s_log.info("AD_Client_ID=" + AD_Client_ID);
// Delete Duplicates
String sql = "DELETE C_PeriodControl pc1 "
String sql = "DELETE FROM C_PeriodControl pc1 "
+ "WHERE (C_Period_ID, DocBaseType) IN "
+ "(SELECT C_Period_ID, DocBaseType "
+ "FROM C_PeriodControl pc2 "

View File

@ -273,7 +273,7 @@ public class FactAcctReset extends SvrProcess
int reset = DB.executeUpdate(sql1, get_TrxName());
// Fact
String sql2 = "DELETE Fact_Acct "
String sql2 = "DELETE FROM Fact_Acct "
+ "WHERE AD_Client_ID=" + p_AD_Client_ID
+ " AND AD_Table_ID=" + AD_Table_ID;
if ( !autoPeriod )

View File

@ -98,7 +98,7 @@ public class ImportAccount extends SvrProcess
// Delete Old Imported
if (m_deleteOldImported)
{
sql = new StringBuilder ("DELETE I_ElementValue ")
sql = new StringBuilder ("DELETE FROM I_ElementValue ")
.append("WHERE I_IsImported='Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -100,7 +100,7 @@ implements ImportProcess
// Delete Old Imported
if (m_deleteOldImported)
{
sql = new StringBuilder ("DELETE I_BPartner ")
sql = new StringBuilder ("DELETE FROM I_BPartner ")
.append("WHERE I_IsImported='Y'").append(clientCheck);
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -93,7 +93,7 @@ public class ImportBankStatement extends SvrProcess
// Delete Old Imported
if (p_deleteOldImported)
{
sql = new StringBuilder ("DELETE I_BankStatement ")
sql = new StringBuilder ("DELETE FROM I_BankStatement ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -99,7 +99,7 @@ public class ImportConversionRate extends SvrProcess
// Delete Old Imported
if (p_DeleteOldImported)
{
sql = new StringBuilder ("DELETE I_Conversion_Rate ")
sql = new StringBuilder ("DELETE FROM I_Conversion_Rate ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -106,7 +106,7 @@ public class ImportGLJournal extends SvrProcess
// Delete Old Imported
if (m_DeleteOldImported)
{
sql = new StringBuilder ("DELETE I_GLJournal ")
sql = new StringBuilder ("DELETE FROM I_GLJournal ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -77,7 +77,7 @@ public class ImportInOutConfirm extends SvrProcess
// Delete Old Imported
if (p_DeleteOldImported)
{
sql = new StringBuilder ("DELETE I_InOutLineConfirm ")
sql = new StringBuilder ("DELETE FROM I_InOutLineConfirm ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -164,7 +164,7 @@ public class ImportInventory extends SvrProcess implements ImportProcess
// Delete Old Imported
if (p_DeleteOldImported)
{
sql = new StringBuilder ("DELETE I_Inventory ")
sql = new StringBuilder ("DELETE FROM I_Inventory ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
no = DB.executeUpdate (sql.toString (), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Imported=" + no);

View File

@ -95,7 +95,7 @@ public class ImportInvoice extends SvrProcess
// Delete Old Imported
if (m_deleteOldImported)
{
sql = new StringBuilder ("DELETE I_Invoice ")
sql = new StringBuilder ("DELETE FROM I_Invoice ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -97,7 +97,7 @@ public class ImportOrder extends SvrProcess
// Delete Old Imported
if (m_deleteOldImported)
{
sql = new StringBuilder ("DELETE I_Order ")
sql = new StringBuilder ("DELETE FROM I_Order ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -99,7 +99,7 @@ public class ImportPayment extends SvrProcess
// Delete Old Imported
if (p_deleteOldImported)
{
sql = new StringBuilder ("DELETE I_Payment ")
sql = new StringBuilder ("DELETE FROM I_Payment ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -109,7 +109,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
// Delete Old Imported
if (m_deleteOldImported)
{
sql = new StringBuilder ("DELETE I_Product ")
sql = new StringBuilder ("DELETE FROM I_Product ")
.append("WHERE I_IsImported='Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.INFO)) log.info("Delete Old Imported =" + no);

View File

@ -85,7 +85,7 @@ public class ImportReportLine extends SvrProcess
// Delete Old Imported
if (m_deleteOldImported)
{
sql = new StringBuilder ("DELETE I_ReportLine ")
sql = new StringBuilder ("DELETE FROM I_ReportLine ")
.append("WHERE I_IsImported='Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);

View File

@ -126,7 +126,7 @@ public class InventoryCountCreate extends SvrProcess
if (log.isLoggable(Level.FINE)) log.fine("doIt - Deleted MA #" + no1);
//End of Added Line
StringBuilder sql = new StringBuilder("DELETE M_InventoryLine WHERE Processed='N' ")
StringBuilder sql = new StringBuilder("DELETE FROM M_InventoryLine WHERE Processed='N' ")
.append("AND M_Inventory_ID=").append(p_M_Inventory_ID);
int no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("doIt - Deleted #" + no);

View File

@ -95,7 +95,7 @@ public class InventoryValue extends SvrProcess
MAcctSchema as = c.getAcctSchema();
// Delete (just to be sure)
StringBuilder sql = new StringBuilder ("DELETE T_InventoryValue WHERE AD_PInstance_ID=");
StringBuilder sql = new StringBuilder ("DELETE FROM T_InventoryValue WHERE AD_PInstance_ID=");
sql.append(getAD_PInstance_ID());
int no = DB.executeUpdateEx(sql.toString(), get_TrxName());
@ -228,7 +228,7 @@ public class InventoryValue extends SvrProcess
if (log.isLoggable(Level.FINE)) log.fine("Update w/o ASI=" + no);
// Delete Records w/o OnHand Qty
sql = new StringBuilder("DELETE T_InventoryValue ")
sql = new StringBuilder("DELETE FROM T_InventoryValue ")
.append("WHERE (QtyOnHand=0 OR QtyOnHand IS NULL) AND AD_PInstance_ID=").append(getAD_PInstance_ID());
int noQty = DB.executeUpdateEx (sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("NoQty Deleted=" + noQty);

View File

@ -115,7 +115,7 @@ public class InvoiceNGL extends SvrProcess
p_DateReval = new Timestamp(System.currentTimeMillis());
// Delete - just to be sure
StringBuilder sql = new StringBuilder("DELETE T_InvoiceGL WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
StringBuilder sql = new StringBuilder("DELETE FROM T_InvoiceGL WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
int no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no > 0)
if (log.isLoggable(Level.INFO)) log.info("Deleted #" + no);

View File

@ -235,10 +235,10 @@ public class M_PriceList_Create extends SvrProcess {
// Delete Old Data
//
if (p_DeleteOld.equals("Y")) {
sqldel = "DELETE M_ProductPrice WHERE M_PriceList_Version_ID=?";
sqldel = "DELETE FROM M_ProductPrice WHERE M_PriceList_Version_ID=?";
cntd = DB.executeUpdate(sqldel, p_PriceList_Version_ID, get_TrxName());
if (cntd == -1)
raiseError(" DELETE M_ProductPrice ", sqldel);
raiseError(" DELETE FROM M_ProductPrice ", sqldel);
totd += cntd;
message = new StringBuilder("@Deleted@=").append(cntd).append(" - ");
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
@ -402,7 +402,7 @@ public class M_PriceList_Create extends SvrProcess {
v_temp = rsCurgen.getInt("M_PriceList_Version_Base_ID");
if (rsCurgen.wasNull() || v_temp != p_PriceList_Version_ID) {
sqldel = "DELETE M_ProductPrice pp WHERE pp.M_PriceList_Version_ID=? AND EXISTS (SELECT t_selection_id FROM T_Selection s WHERE pp.M_Product_ID=s.T_Selection_ID AND s.AD_PInstance_ID=?)";
sqldel = "DELETE FROM M_ProductPrice pp WHERE pp.M_PriceList_Version_ID=? AND EXISTS (SELECT t_selection_id FROM T_Selection s WHERE pp.M_Product_ID=s.T_Selection_ID AND s.AD_PInstance_ID=?)";
cntd = DB.executeUpdate(sqldel, new Object[]{p_PriceList_Version_ID, m_AD_PInstance_ID}, false, get_TrxName());
if (cntd == -1)
raiseError(" DELETE M_ProductPrice ", sqldel);

View File

@ -106,8 +106,8 @@ public class M_Production_Run extends SvrProcess {
if (!"Y".equals(production.getIsCreated()) )
{
int line = 100;
int no = DB.executeUpdateEx("DELETE M_ProductionLine WHERE M_ProductionPlan_ID = ?", new Object[]{pp.getM_ProductionPlan_ID()},get_TrxName());
if (no == -1) raiseError("ERROR", "DELETE M_ProductionLine WHERE M_ProductionPlan_ID = "+ pp.getM_ProductionPlan_ID());
int no = DB.executeUpdateEx("DELETE FROM M_ProductionLine WHERE M_ProductionPlan_ID = ?", new Object[]{pp.getM_ProductionPlan_ID()},get_TrxName());
if (no == -1) raiseError("ERROR", "DELETE FROM M_ProductionLine WHERE M_ProductionPlan_ID = "+ pp.getM_ProductionPlan_ID());
MProduct product = MProduct.get(getCtx(), pp.getM_Product_ID());

View File

@ -191,7 +191,7 @@ public class ReplenishReport extends SvrProcess
if (log.isLoggable(Level.FINE)) log.fine("Corrected CurrentVendor(N)=" + no);
// Just to be sure
sql = new StringBuilder("DELETE T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
sql = new StringBuilder("DELETE FROM T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
if (log.isLoggable(Level.FINE)) log.fine("Delete Existing Temp=" + no);
@ -266,7 +266,7 @@ public class ReplenishReport extends SvrProcess
if (log.isLoggable(Level.FINE)) log.fine("Update #" + no);
// Delete inactive products and replenishments
sql = new StringBuilder("DELETE T_Replenish r ");
sql = new StringBuilder("DELETE FROM T_Replenish r ");
sql.append("WHERE (EXISTS (SELECT * FROM M_Product p ");
sql.append("WHERE p.M_Product_ID=r.M_Product_ID AND p.IsActive='N')");
sql.append(" OR EXISTS (SELECT * FROM M_Replenish rr ");
@ -390,7 +390,7 @@ public class ReplenishReport extends SvrProcess
}
}
// Delete rows where nothing to order
sql = new StringBuilder("DELETE T_Replenish ");
sql = new StringBuilder("DELETE FROM T_Replenish ");
sql.append("WHERE QtyToOrder < 1");
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());

View File

@ -201,7 +201,7 @@ public class ReplenishReportProduction extends SvrProcess
if (log.isLoggable(Level.FINE)) log.fine("Corrected CurrentVendor(N)=" + no);
// Just to be sure
sql = new StringBuilder("DELETE T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
sql = new StringBuilder("DELETE FROM T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
if (log.isLoggable(Level.FINE)) log.fine("Delete Existing Temp=" + no);
@ -300,7 +300,7 @@ public class ReplenishReportProduction extends SvrProcess
// Delete inactive products and replenishments
sql = new StringBuilder("DELETE T_Replenish r ");
sql = new StringBuilder("DELETE FROM T_Replenish r ");
sql.append("WHERE (EXISTS (SELECT * FROM M_Product p ");
sql.append("WHERE p.M_Product_ID=r.M_Product_ID AND p.IsActive='N')");
sql.append(" OR EXISTS (SELECT * FROM M_Replenish rr ");
@ -424,7 +424,7 @@ public class ReplenishReportProduction extends SvrProcess
}
}
// Delete rows where nothing to order
sql = new StringBuilder("DELETE T_Replenish ");
sql = new StringBuilder("DELETE FROM T_Replenish ");
sql.append("WHERE QtyToOrder < 1");
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());

View File

@ -84,11 +84,11 @@ public class TaxDeclarationCreate extends SvrProcess
if (p_DeleteOld)
{
// Delete old
String sql = "DELETE C_TaxDeclarationLine WHERE C_TaxDeclaration_ID=?";
String sql = "DELETE FROM C_TaxDeclarationLine WHERE C_TaxDeclaration_ID=?";
int no = DB.executeUpdate(sql, p_C_TaxDeclaration_ID, false, get_TrxName());
if (no != 0)
if (log.isLoggable(Level.CONFIG)) log.config("Delete Line #" + no);
sql = "DELETE C_TaxDeclarationAcct WHERE C_TaxDeclaration_ID=?";
sql = "DELETE FROM C_TaxDeclarationAcct WHERE C_TaxDeclaration_ID=?";
no = DB.executeUpdate(sql, p_C_TaxDeclaration_ID, false, get_TrxName());
if (no != 0)
if (log.isLoggable(Level.CONFIG)) log.config("Delete Acct #" + no);

View File

@ -100,7 +100,7 @@ public class TreeMaintenance extends SvrProcess
// Delete unused
StringBuilder sql = new StringBuilder();
sql.append("DELETE ").append(nodeTableName)
sql.append("DELETE FROM ").append(nodeTableName)
.append(" WHERE AD_Tree_ID=").append(tree.getAD_Tree_ID())
.append(" AND Node_ID NOT IN (SELECT ").append(sourceTableKey)
.append(" FROM ").append(sourceTableName)

View File

@ -705,7 +705,7 @@ public abstract class Doc
*/
protected int deleteAcct()
{
StringBuilder sql = new StringBuilder ("DELETE Fact_Acct WHERE AD_Table_ID=")
StringBuilder sql = new StringBuilder ("DELETE FROM Fact_Acct WHERE AD_Table_ID=")
.append(get_Table_ID())
.append(" AND Record_ID=").append(p_po.get_ID())
.append(" AND C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());

View File

@ -2737,7 +2737,7 @@ public class GridTable extends AbstractTableModel
}
else // Delete via SQL
{
StringBuilder sql = new StringBuilder("DELETE ");
StringBuilder sql = new StringBuilder("DELETE FROM ");
sql.append(m_tableName).append(" WHERE ").append(getWhereClause(rowData));
int no = 0;
PreparedStatement pstmt = null;

View File

@ -161,7 +161,7 @@ public class MAcctProcessor extends X_C_AcctProcessor
{
if (getKeepLogDays() < 1)
return 0;
StringBuilder sql = new StringBuilder("DELETE C_AcctProcessorLog ")
StringBuilder sql = new StringBuilder("DELETE FROM C_AcctProcessorLog ")
.append("WHERE C_AcctProcessor_ID=").append(getC_AcctProcessor_ID())
.append(" AND (Created+").append(getKeepLogDays()).append(") < SysDate");
int no = DB.executeUpdate(sql.toString(), get_TrxName());

View File

@ -130,7 +130,7 @@ public class MAlertProcessor extends X_AD_AlertProcessor
{
if (getKeepLogDays() < 1)
return 0;
String sql = "DELETE AD_AlertProcessorLog "
String sql = "DELETE FROM AD_AlertProcessorLog "
+ "WHERE AD_AlertProcessor_ID=" + getAD_AlertProcessor_ID()
+ " AND (Created+" + getKeepLogDays() + ") < SysDate";
int no = DB.executeUpdate(sql, get_TrxName());

View File

@ -73,7 +73,7 @@ public class MFactAcct extends X_Fact_Acct
public static int deleteEx(int AD_Table_ID, int Record_ID, String trxName)
throws DBException
{
final String sql = "DELETE Fact_Acct WHERE AD_Table_ID=? AND Record_ID=?";
final String sql = "DELETE FROM Fact_Acct WHERE AD_Table_ID=? AND Record_ID=?";
int no = DB.executeUpdateEx(sql, new Object[]{AD_Table_ID, Record_ID}, trxName);
if (s_log.isLoggable(Level.FINE)) s_log.fine("delete - AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID + " - #" + no);
return no;

View File

@ -128,7 +128,7 @@ public class MIMPProcessor
{
if (getKeepLogDays() < 1)
return 0;
StringBuilder sql = new StringBuilder("DELETE ").append(X_IMP_ProcessorLog.Table_Name).append(" ")
StringBuilder sql = new StringBuilder("DELETE FROM ").append(X_IMP_ProcessorLog.Table_Name).append(" ")
.append("WHERE ").append(X_IMP_ProcessorLog.COLUMNNAME_IMP_Processor_ID).append("=").append(getIMP_Processor_ID())
.append(" AND (Created+").append(getKeepLogDays()).append(") < SysDate");
int no = DB.executeUpdate(sql.toString(), get_TrxName());

View File

@ -1644,7 +1644,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
{
log.fine("");
// Delete Taxes
StringBuilder msgdb = new StringBuilder("DELETE C_InvoiceTax WHERE C_Invoice_ID=").append(getC_Invoice_ID());
StringBuilder msgdb = new StringBuilder("DELETE FROM C_InvoiceTax WHERE C_Invoice_ID=").append(getC_Invoice_ID());
DB.executeUpdateEx(msgdb.toString(), get_TrxName());
m_taxes = null;

View File

@ -977,7 +977,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
{
if (isProcessed())
return "Processed";
StringBuilder sql = new StringBuilder("DELETE C_LandedCostAllocation WHERE C_InvoiceLine_ID=").append(getC_InvoiceLine_ID());
StringBuilder sql = new StringBuilder("DELETE FROM C_LandedCostAllocation WHERE C_InvoiceLine_ID=").append(getC_InvoiceLine_ID());
int no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
if (log.isLoggable(Level.INFO)) log.info("Deleted #" + no);

View File

@ -181,7 +181,7 @@ public class MLdapProcessor extends X_AD_LdapProcessor implements AdempiereProce
{
if (getKeepLogDays() < 1)
return 0;
StringBuilder sql = new StringBuilder("DELETE AD_LdapProcessorLog ")
StringBuilder sql = new StringBuilder("DELETE FROM AD_LdapProcessorLog ")
.append("WHERE AD_LdapProcessor_ID=").append(getAD_LdapProcessor_ID())
.append(" AND (Created+").append(getKeepLogDays()).append(") < SysDate");
int no = DB.executeUpdate(sql.toString(), get_TrxName());

View File

@ -1783,7 +1783,7 @@ public class MOrder extends X_C_Order implements DocAction
{
log.fine("");
// Delete Taxes
DB.executeUpdateEx("DELETE C_OrderTax WHERE C_Order_ID=" + getC_Order_ID(), get_TrxName());
DB.executeUpdateEx("DELETE FROM C_OrderTax WHERE C_Order_ID=" + getC_Order_ID(), get_TrxName());
m_taxes = null;
MTaxProvider[] providers = getTaxProviders();

View File

@ -378,7 +378,7 @@ public class MRMA extends X_M_RMA implements DocAction
{
log.fine("");
// Delete Taxes
DB.executeUpdateEx("DELETE M_RMATax WHERE M_RMA_ID=" + getM_RMA_ID(), get_TrxName());
DB.executeUpdateEx("DELETE FROM M_RMATax WHERE M_RMA_ID=" + getM_RMA_ID(), get_TrxName());
m_taxes = null;
MTaxProvider[] providers = getTaxProviders();

View File

@ -209,7 +209,7 @@ public class MRequestProcessor extends X_R_RequestProcessor
{
if (getKeepLogDays() < 1)
return 0;
String sql = "DELETE R_RequestProcessorLog "
String sql = "DELETE FROM R_RequestProcessorLog "
+ "WHERE R_RequestProcessor_ID=" + getR_RequestProcessor_ID()
+ " AND (Created+" + getKeepLogDays() + ") < SysDate";
int no = DB.executeUpdate(sql, get_TrxName());

View File

@ -142,7 +142,7 @@ public class MScheduler extends X_AD_Scheduler
{
if (getKeepLogDays() < 1)
return 0;
String sql = "DELETE AD_SchedulerLog "
String sql = "DELETE FROM AD_SchedulerLog "
+ "WHERE AD_Scheduler_ID=" + getAD_Scheduler_ID()
+ " AND (Created+" + getKeepLogDays() + ") < SysDate";
int no = DB.executeUpdateEx(sql, get_TrxName());

View File

@ -126,7 +126,7 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
{
if (getKeepLogDays() < 1)
return 0;
String sql = "DELETE AD_WorkflowProcessorLog "
String sql = "DELETE FROM AD_WorkflowProcessorLog "
+ "WHERE AD_WorkflowProcessor_ID=" + getAD_WorkflowProcessor_ID()
+ " AND (Created+" + getKeepLogDays() + ") < SysDate";
int no = DB.executeUpdate(sql, get_TrxName());

View File

@ -84,7 +84,7 @@ public class ImportFixedAsset extends SvrProcess
// Delete Old Imported
if (p_DeleteOldImported)
{
sql = new StringBuffer ("DELETE "+X_I_FixedAsset.Table_Name
sql = new StringBuffer ("DELETE FROM "+X_I_FixedAsset.Table_Name
+ " WHERE I_IsImported='Y'").append (sqlCheck);
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Imported =" + no);

View File

@ -98,7 +98,7 @@ public class FavouriteController {
.append("'Y',SysDate,").append(AD_User_ID).append(",SysDate,").append(AD_User_ID).append(")");
// if already exist, will result in ORA-00001: unique constraint (ADEMPIERE.AD_TREEBAR_KEY)
else
sql.append("DELETE AD_TreeBar WHERE AD_Tree_ID=").append(m_AD_Tree_ID)
sql.append("DELETE FROM AD_TreeBar WHERE AD_Tree_ID=").append(m_AD_Tree_ID)
.append(" AND AD_User_ID=").append(AD_User_ID)
.append(" AND Node_ID=").append(Node_ID);
int no = DB.executeUpdate(sql.toString(), false, null);

View File

@ -138,11 +138,11 @@ public class Merge
+ " - " + ColumnName + " - From=" + from_ID + ",To=" + to_ID);
if (success)
{
sql = "DELETE " + TableName + " WHERE " + ColumnName + "=" + from_ID;
sql = "DELETE FROM " + TableName + " WHERE " + ColumnName + "=" + from_ID;
if ( DB.executeUpdate(sql, m_trx.getTrxName()) < 0 )
{
m_errorLog.append(Env.NL).append("DELETE ").append(TableName)
m_errorLog.append(Env.NL).append("DELETE FROM ").append(TableName)
.append(" - ");
success = false;
if (log.isLoggable(Level.CONFIG)) log.config(m_errorLog.toString());
@ -196,7 +196,7 @@ public class Merge
if (m_deleteTables[i].equals(TableName))
{
delete = true;
sql = "DELETE " + TableName + " WHERE " + ColumnName + "=" + from_ID;
sql = "DELETE FROM " + TableName + " WHERE " + ColumnName + "=" + from_ID;
}
}
// Delete newly created MCost records - teo_sarca [ 1704554 ]
@ -213,7 +213,7 @@ public class Merge
{
count = -1;
m_errorLog.append(Env.NL)
.append(delete ? "DELETE " : "UPDATE ")
.append(delete ? "DELETE FROM " : "UPDATE ")
.append(TableName).append(" - ")
.append(" - ").append(sql);
if (log.isLoggable(Level.CONFIG)) log.config(m_errorLog.toString());