Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

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!

incremental variable in column native query

843830Feb 16 2010 — edited Feb 17 2010
i'm looking for a jpql way of doing a cumulative variable query like subttl:
select scat.*, @subttl:=if(@subttl=null,0,@subttl) +imp*dh as subttl from scat;
is there any way to use variables in the select clause ?...

As other way, I thought making a native query but I need the resultset mapped to an entity bean, so I think it can't be possible.

I appreciate your help!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2010
Added on Feb 16 2010
2 comments
132 views