Hi Sergey
>I think you'e missing my point. I looked at your CASE expression and don't understand why it has to be so complicated.
It got complicated because 100-60 has to be done only on the Dr side in one record and on the second record 60-60 has to be performed on the Cr side, the other side Cr and Dr resp. need not be calculated as it does not have a value. Furthermore, an entry that does not have an adjustment created till date will have 0 for both Dr. and Cr (will be null as it does not have an Adjustment table entry) but actually I would want to see the original amount in either Dr or Cr column as the value is still unadjusted.
Further Dorin has simplified the SELECT statement to make the CASE bearable <g>. I still ahve less experience with SQL's
>Thank you.
Welcome and one of the vote is mine <g>.