
select RN from (
select rownum RN, dbid from ( select * from profile p where type = 1912 and name like 'a%' order by globalid ) )
where db_id = 259;
this is the sql
The below hql doesn't work
select RN from (
select rownum RN, DBId from (
select distinct p from com.eci.sid.profile.Profile p where p.profileKey.profileType = ? order by p.profileKey.name
)
)
where DBId = ?