Commit c8fa22b7 authored by prane's avatar prane

to clear all the data before rebuild the summary data

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@217970 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 42575a12
......@@ -209,6 +209,14 @@ public class UpdateDemSuppSummaryPrc extends ProcessEJB implements UpdateDemSupp
}
BaseLogger.log("3", null, null,"Final standingOrdTypes :" + standingOrdTypes);
//Added Pavan Rane 17MAR20 [to clear all the data before rebuild the summary data] START
adpQuery = "DELETE FROM INV_DEM_SUPP";
pstmt = conn.prepareStatement(adpQuery);
int delCnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("While rebuild data cleared:"+delCnt);
//Added Pavan Rane 17MAR20 [to clear all the data before rebuild the summary data] END
sqlFileName = CommonConstants.JBOSSHOME + File.separator + "sql" + File.separator + "demandSupplyOverwriteOracle.sql";
BaseLogger.log("9", null, null, "Reading SQL.....adpQuery >>> "+sqlFileName);//NLSQLINPUT
adpQuery = checkNull(readFile(sqlFileName));
......@@ -224,7 +232,7 @@ public class UpdateDemSuppSummaryPrc extends ProcessEJB implements UpdateDemSupp
adpQuery = adpQuery.replaceAll("@ordtypes@", standingOrdTypes);
BaseLogger.log("9", null, null, "Replacing Values.in SQL.....adpQuery >>> "+adpQuery+"\n\n\n\n");
//Pavan Rane 16DEC19 [to clear the data before rebuild the summary data] START
pstmt = conn.prepareStatement(adpQuery);
/*pstmt = conn.prepareStatement(adpQuery);
rs = pstmt.executeQuery();
while (rs.next())
{
......@@ -266,7 +274,7 @@ public class UpdateDemSuppSummaryPrc extends ProcessEJB implements UpdateDemSupp
rs.close();
rs = null;
pstmt.close();
pstmt = null;
pstmt = null;*/
//Pavan Rane 16DEC19 [to clear the data before rebuild the summary data] END
pstmt = conn.prepareStatement(adpQuery);
rs = pstmt.executeQuery();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment