ps=con.prepareStatement("select * from REGISTER inner join ORGAN on REGISTER.PATIENTID=ORGAN.PATIENTID where ORGAN.ORGAN LIKE ?");
ps.setString(1,"'%"+o.getOrgan()+"%'");
I executed the query in SQL Developer which works fine, but in DAO class it is not returning any result set.
Use
ps.setString(1, "%" + o.getOrgan() + "%");
Note the absence of quotes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With