java - JDBC Query doesn't return any result but the same query works on the database shell -


i have huge problem unable figure out issue, highly appreciate in advance.

        con = getconnection(sfpqueries.datasource);                  stmt1 = con.preparestatement("select distinct a.summarization_query, a.aggregate_id, b.token, c.fact_token, d.field_id, d.measures "+                 "from summarization_time_aggrregate_mapping_tb a, summarization_tb b, fact_tb c, summarization_measures_mapping_tb d "+                 "where a.summarization_id=b.summarization_id , b.fact_id=c.fact_id , a.summarization_id=d.summarization_id , a.aggregate_id=?");         stmt1.setint(1,1);         rs1 = stmt1.executequery();         if(_log.isdebugenabled()){_log.debug(" >> before " + rs1.next());} 

for above jdbc query there no result returned jdbc.

10/04/2014 11:41:56.866 info com.hp.sfp.core.dao.impl.basedao : enter getconnection() 10/04/2014 11:41:57.253 info com.hp.sfp.core.dao.impl.basedao : database information: url=jdbc:vertica://*/abcd username=xyz password=xyz@123 10/04/2014 11:41:57.254 info com.hp.sfp.core.dao.impl.basedao : exit getconnection() 10/04/2014 11:41:57.382 debug com.hp.sfp.core.dao.impl.summarizationjobdaoimpl : >> before false

but when use same query on shell result!

=> select distinct a.summarization_query, a.aggregate_id, b.token, c.fact_token,    d.field_id, d.measures summarization_time_aggrregate_mapping_tb a, summarization_tb b, fact_tb c, summarization_measures_mapping_tb d a.summarization_id=b.summarization_id , b.fact_id=c.fact_id , a.summarization_id=d.summarization_id , a.aggregate_id=1; summarization_query | aggregate_id |       token        | fact_token | field_id |        measures ---------------------+--------------+--------------------+------------+----------+--------- select * ...   |            1 | summary_for_charge | chargefact |       37 |    call_end_cause select * ...   |            1 | summary_for_charge | chargefact |        1 | structure_code select * ...   |            1 | summary_for_charge | chargefact |       45 | roamer_indicator 

i'm sorry, explain me didn't run 'commit'. on database shell shows result through jdbc can't. issue.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -