The query code and query:
ps = conn.prepareStatement(\"select instance_id, ? from eam_measurement where resource_id in (select RESOURCE_ID from eam_res_grp_r
PreparedStatement ps = con.prepareStatement( "select columname from tablename where LOWER(columnname) LIKE LOWER('"+var+"%')");
Here var is the variable in which value that is to be searched is stored...
var