All pastes #939809 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-03-12 16:27 UTC
rendered paste body
SELECT tblTransactions.TransactionDate, tblTransactions.TransactionDescription, tblTransactionDebits.DebitAmount, tblTransactionCredits.CreditAmount, tblAccounts.AccountName
FROM ((tblTransactionDebits INNER JOIN tblTransactions ON tblTransactionDebits.TransactionID=tblTransactions.TransactionID) INNER JOIN tblTransactionCredits ON tblTransactions.TransactionID=tblTransactionCredits.TransactionID) 
LEFT JOIN tblAccounts ON tblTransactionCredits.AccountID=tblAccounts.AccountID
LEFT JOIN tblAccounts ON tblTransactionDebits.AccountID=tblAccounts.AccountID;