hibernate - HQL : Order by varchar2 as INT -
i'm working on statement in hql , have results sorted numbers. kind of results can have : dr71 frein resf-37 r-37 ... i have sorted numbers composed of. i had : select distinct r.type reference r order replace(replace(replace(r.type, '-', ''), 'f', ''), ' ', '') it enough because @ beginning, r, - , f used. have solution supporting every characters. i tried : order cast(r.type int) but gives sql error: 1722, sqlstate: 42000 any idea how ?