dragonwell
Programmer
Can someone explain the difference (if there is one) between the following two queries:
SELECT c.CusID,
SUM(ISNULL(p.Amount, 0)) AS Payments
FROM Customer c
LEFT OUTER JOIN Payment p ON p.CusID = c.CusID
GROUP BY c.CusID
SELECT c.CusID,
ISNULL(SUM(p.Amount), 0) AS Payments
FROM Customer c
LEFT OUTER JOIN Payment p ON p.CusID = c.CusID
GROUP BY c.CusID
Thanks...
SELECT c.CusID,
SUM(ISNULL(p.Amount, 0)) AS Payments
FROM Customer c
LEFT OUTER JOIN Payment p ON p.CusID = c.CusID
GROUP BY c.CusID
SELECT c.CusID,
ISNULL(SUM(p.Amount), 0) AS Payments
FROM Customer c
LEFT OUTER JOIN Payment p ON p.CusID = c.CusID
GROUP BY c.CusID
Thanks...