I am still getting the two records for an account, if there are the records in the client_pmt table, How does distinct work?
----- Original Message -----
From: Scott Weikert
To: CF-Talk
Sent: Monday, December 01, 2003 1:37 PM
Subject: Re: SQL Help on Join
Mickael writes:
> Select Count(*) as TotalAccounts, Sum(Orig_amt) as SumOrig_AMT, Sum(Cur_Bal) as SumCurBal, Sum(Pmt_amt) as SUMPmtamt
> from Client_debt
> Left outer join Client_pmt on client_debt.debt_id = client_pmt.debt_id
You're specifying the table names of the fields in your JOIN but not in your
SELECT. Should be, for example, SUM(tablename.Orig_atm), etc.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

