Dear All,
I have one query that returns string value, my query is
select case when (select count (distinct style_packing_spec_id) from packing_spec_uses_pack p,style_pack sp where sp.style_pack_id=p.style_pack_id and sp.style_id=1701) != (select count (distinct style_packing_spec_id) from style_packing_spec where style_id=1701) then 'DonotProceed' else 'Proceed' end "; It gives result as below
?case?
----------
DonotProceed
how to execute this is in java, how to handle this result set,I tried like this
String sql="query";
ResultSet rs=stmt.executeQuery(sql);
It returns nullpointerexception String str=rs.getString(1);