sorry for causing so much confusion! i will list out the relevant fields and then what i am trying to achieve!
FDU_AMNT.FDU = Fee amount generated
FDU_CORD.FDU - Credit or Debit? (C or D)
SFU_CFEE.SFU = Expected Fee on Customer Record
The fee amount is always a positive number whether credit or debit and a customer may have multiple debits or credits or no credits. I want to sum FDU_AMNT.FDU where the FDU.CORD.FDU is C, sum them again where the FDU_CORD.FDU is D and then take away the total for C from the total for D but leave a positive number despite the figure being a debit. I then want to compare this total to SFU_CFEE.SFU and then only show records where these two figures don't match.
Thank you again for all your support, i am completely stumped!
Please let me know if you need any further information