bobmunkhouse
Technical User
I have a RIGHT JOIN on a query showing each of the names of teams. To the right of this there is a sum for each team of the amount they owe, and to the right of this is the standard fee that each team must pay on top of this. (see Query headings below):
TeamID MoneyOwed StandardFee
I've used a RIGHT JOIN so that a team will appear in the query even if they owe no money. The problem is that it shows no value under the MoneyOwed column if a team owes no money, rather than a "0". This is a problem because i need to make calculations using it, by adding the two fees together, but the null value just cancels out the Standard fee.
I hope you're not confused, please help me
Here is the SQL for my query if it helps:
SELECT StandardFee.TeamID, Sum(tblPayment.AmountDue) AS [Money Owed], StandardFee.AmountDue AS [Standard Fee]
FROM tblPayment RIGHT JOIN StandardFee ON tblPayment.TeamID = StandardFee.TeamID
GROUP BY StandardFee.TeamID, StandardFee.AmountDue;
TeamID MoneyOwed StandardFee
I've used a RIGHT JOIN so that a team will appear in the query even if they owe no money. The problem is that it shows no value under the MoneyOwed column if a team owes no money, rather than a "0". This is a problem because i need to make calculations using it, by adding the two fees together, but the null value just cancels out the Standard fee.
I hope you're not confused, please help me
Here is the SQL for my query if it helps:
SELECT StandardFee.TeamID, Sum(tblPayment.AmountDue) AS [Money Owed], StandardFee.AmountDue AS [Standard Fee]
FROM tblPayment RIGHT JOIN StandardFee ON tblPayment.TeamID = StandardFee.TeamID
GROUP BY StandardFee.TeamID, StandardFee.AmountDue;