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!!