i tried this on SQL prompt
select sum(amount) from tbl_daily_collection where user_code in (select distinct subdiv from tbl_admcd where div =645
it is woeking.... but not that in
java.....
PreparedStatement st= conn.prepareStatement("select sum(amount) from tbl_daily_collection where user_code in (select distinct subdiv from tbl_admcd where div = ?)");
st.setInt(1,user);
ResultSet rs = st.executeQuery();
please help me...