-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: running rums
PostPosted: Fri Feb 15, 2013 4:12 pm 
Newbie

Joined: Thu Feb 14, 2013 10:04 am
Posts: 4
Hello there !
I am new to HQL and got to a roadblock with my application. I hope someone can provide a little guidance ;D
The problem is as follows: I need to produce a report to calculate. I have the following tables:

Contract (ContractNumber, employee, initialSalary, DateOfEnrolment)
Salary increase (ContractNumberId, AmountIncrease, DateIncrease)

I need to produce a table that calculates the current salary for every PayrollPeriod.
Columns being (ContractNumer, InitialSalary, AmountIncrease, FinalSalary)
Rows being (PayrollPeriods)

Of course row1 is easy to calculate (FinalSalary=InitialSalary+AmountIncrease).
The problem appears in row2 onwards, when we should have InitialSalary(wor2)=FinalSalary(row1).
Since FinalSalary is a value created in the query, I don't know how to get rround it. Anyone knows how that could be done?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.