hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhavesh Shah <>
Subject Problem related to Hive using JDBC
Date Fri, 16 Mar 2012 05:47:54 GMT
I am trying to implement a task in Hive like Stored Procedure in SQL.
In SQL, when we write cursor, first we execute select query and then
fetching the records we perform some actions.

Likely I have fired a select query as actions in Hive.
sql="select a,c,b from tbl_name";
res=stmt.executeQuery();    -----------> CONTAINS 30 RECORDS
     sql="insert into tabl2..... ";
     like wise many queries are there.....


As my select query contans 30 records but when I execute it   my
while( execute only once.
I didn't get any kind of errors/exceptions

But instead of queries I just try to display field to check whether it is
fetching or not
then it is working fine..  (while loop contains only System.out.println

sql="select * from tbl_name";

   S.O.P.("fields : "+res.getString(0));

Why it is happening I am not getting. Is anything I am doing wrong?

Bhavesh Shah

View raw message