Commit c70e23df authored by kdabholkar's avatar kdabholkar

commited changes in DB2 query

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@178525 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1e76ff6b
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>webitm-gst-clientCommit-purpose-17-jan-2018</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
......@@ -22,6 +22,7 @@ import javax.ejb.TransactionAttribute;
import javax.ws.rs.core.Form;
import javax.ws.rs.core.MediaType;
import org.apache.commons.collections.set.SynchronizedSortedSet;
import org.jboss.ejb3.annotation.TransactionTimeout;
import org.json.JSONObject;
import org.w3c.dom.Document;
......@@ -267,7 +268,20 @@ public class GetGstTableData extends ActionHandlerEJB implements GetGstTableData
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME ))
{
sql = " SELECT * FROM GST_DATA_HDR WHERE SUBMIT_STATUS = 'P' and site_code = ? and PRD_CODE= ? AND REC_TYPE = ? and FETCH FIRST ? ROWS ONLY ";
System.out.println("New Query Are As follows");
//Changes By Kaustubh on 17 Jan 2018 start
//sql = " SELECT * FROM GST_DATA_HDR WHERE SUBMIT_STATUS = 'P' and site_code = ? and PRD_CODE= ? AND REC_TYPE = ? FETCH FIRST ? ROWS ONLY ";
sql = " select * from"
+" (select"
+" ROW_NUMBER() OVER() as rownumber , gst_data_hdr.*"
+" from gst_data_hdr WHERE SUBMIT_STATUS = 'P' and site_code = ?"
+" and PRD_CODE= ? AND REC_TYPE = ?) as temp"
+" where rownumber <= ?";
//Changes By Kaustubh on 17 Jan 2018 end
}
else
{
......
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