Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too many records now

Status
Not open for further replies.

bhansen

IS-IT--Management
Mar 14, 2002
53
CA
I have employee payroll transactions that have an overhead value, this value may have changed through out the year so there is another table that includes the overhead history. The overhead history table does not include all employees in it, just ones that have changed.

As per a previous post I was only getting records that actually had the employee in the history table, and we came up with the following.

My Overhead History Table (1) is now linked to the Employee Transaction Table (2) with a "Left Open Link" and my formula is as follows;

if isnull({1.OVERHEAD.EMPLOYEE_NUM}) then {2.TRANSACTION_AMOUNT}*{1.OVERHEAD_PERCENT}+{2.TRANSACTION_AMOUNT }
else
if {2.TRANSACTION_DATE} >= {1.OVERHEAD_HISTORY.START_DATE} and {2. TRANSACTION_DATE } <= {1.OVERHEAD_HISTORY.END_DATE}
then {2.TRANSACTION_AMOUNT}*{1.PA_EMP_OVH.OVH_PRCNT}+{2.TRANSACTION_AMOUNT}
else {2.TRANSACTION_AMOUNT}*{1.OVERHEAD_PERCENT}+{2.TRANSACTION_AMOUNT }

Now I seem to be getting values from both my history table and current table, essentially doubling my totals.

Thanks in Advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top