SQL Question

Results 1 to 2 of 2

Thread: SQL Question

  1. #1
    Join Date
    Dec 1969

    Default SQL Question

    I have the following tables<BR>TableA<BR>ID<BR>User_ID<BR>Location_ID<B R>theDate<BR>Type_ID<BR>DetaiType_ID<BR>Descriptio n<BR>Account<BR>Debit<BR>Credit<BR><BR>TableB<BR>t hedate<BR>Account<BR>Decscription<BR>Expr1<BR>Coun t<BR><BR>and the following SQL statement<BR><BR>select theDate, Account,<BR> sum(Debit + Credit),<BR> count(*)<BR>from TableA<BR>group by theDate, Account<BR><BR>Ot work great but I need to get the Decstition from the table also<BR><BR>Bill<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Question

    select theDate, Account,<BR>sum(a.Debit + a.Credit),<BR>count(*), b.description<BR>from TableA a INNER JOIN TableB b ON b.account = a.account<BR>group by theDate, Account<BR><BR>jason

Posting Permissions

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