Results 1 to 3 of 3

Thread: Sum Problem

Hybrid View

  1. #1
    Join Date
    Sep 2002
    Posts
    218

    Sum Problem

    I'm trying to Sum Transactions but I have a small problem that I need advice on. Please see attached file
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    What is FNS_tbTransYaap? Any relation to Transactions table?

  3. #3
    Join Date
    Sep 2005
    Posts
    168
    SELECT a.Client, SUM(b.Amount) AS OutStandingBal
    FROM tbTransactions a
    LEFT JOIN tbTransactions b ON a.Client = b.Client AND (a.LoanRefId = b.LoanRefId OR a.LoanRefId = b.LoanRefId + 'R')
    GROUP BY a.Client

    --HTH--

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •