I am using Jdbctemplate to retrieve a single String value from the db. Here is my method.
public String test() {
String cert=null;
Strin
Ok, I figured it out. I just wrapped it in a try catch and send back null.
public String test() {
String cert=null;
String sql = "select ID_NMB_SRZ from codb_owner.TR_LTM_SLS_RTN
where id_str_rt = '999' and ID_NMB_SRZ = '60230009999999'";
try {
Object o = (String) jdbc.queryForObject(sql, String.class);
cert = (String) o;
} catch (EmptyResultDataAccessException e) {
e.printStackTrace();
}
return cert;
}