Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need help converting SQL "OVER (PARTITION BY )" to JPQL equivalent - JPA

user229390Aug 13 2012 — edited Aug 15 2012
Having trouble converting this query:
-----------
select
sdi,
val,
vldtn,
TO_CHAR(sdt, 'yyyy-mm-dd hh:mi:ss AM')
from
(
select
sdi,
val,
vldtn,
sdt,
max(sdt) over (partition by sdi) as MaxDate1
from
r_ins
) x
where x.sdt = x.MaxDate1
and sdi in (1234,2345,3456,4567,5678,6789,7890);
-----------
to JPQL equivalent using JPA

Able to convert simple queries but I do not know how to handle the "over (partition by sdi)" portion of the query.

Can anyone help

TIA
Jer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 12 2012
Added on Aug 13 2012
20 comments
6,896 views