Re: SQL Help on Join

2003-12-01 Thread Deanna Schneider
Yes, that's true. But, sub-queries are there for a reason - you can use them when you need to. - Original Message - From: "Mickael" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, December 01, 2003 2:07 PM Subject: Re: SQL Help on

Re: SQL Help on Join

2003-12-01 Thread Mickael
uot; <[EMAIL PROTECTED]>   Sent: Monday, December 01, 2003 12: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   &

Re: SQL Help on Join

2003-12-01 Thread Deanna Schneider
t; Sent: Monday, December 01, 2003 12: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_d

RE: SQL Help on Join

2003-12-01 Thread cf-talk
Typically you don't count * But you would do it this way... count(tablename.*) -Novak -Original Message- From: Mickael [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 10:18 AM To: CF-Talk Subject: Re: SQL Help on Join how do I specify the tablename with the

Re: SQL Help on Join

2003-12-01 Thread Mickael
Hey Scott, 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

Re: SQL Help on Join

2003-12-01 Thread Mickael
how do I specify the tablename with the Count(*)?   - 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)

Re: SQL Help on Join

2003-12-01 Thread Scott Weikert
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

SQL Help on Join

2003-12-01 Thread Mickael
Hello All, I am not getting the results that I am looking for may query. Here is my sql 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 Th