java - Converting varchar to integer on Oracle using Hibernate -
in project score field in database varchar datatype, contains integer values need fetch records having score between 70 50. (i.e less 70).
my query
query count_query = stmt1.query().from(selectedtable).selectcount(). where(districtcolumn).equals(district_code). and(score).isnull().or(score).lessthan("70").toquery();
trying to_num not accepting. accepts column data types.
try modify entity (tested on mysql):
@formula(value = " cast(score decimal(10,0) ) ") public long getscore()
Comments
Post a Comment