I have a complicated query which pulls sums created by 9 other queries into one row of data based on a job number. Each of the 9 sub-queries groups by the job and part number, then sums the amounts in question. If the job number does not exist, that sum will show as a null in the main query.
I need to know how to make that sum show as a 0 if it is NULL.
Here's a simpler version of the main query - how can I modify this to replace Nulls with 0?
[tt]
SELECT [Jobs Query].fpartno, Sum(qryMatTotTot.MaterialTot) AS MaterialTot
FROM ([Jobs Query] LEFT JOIN qryMatTotTot ON ([Jobs Query].fpartno=qryMatTotTot.fpartno) AND ([Jobs Query].fjob_so=qryMatTotTot.fjobno))
GROUP BY [Jobs Query].fpartno;
[/tt]
Cheryl dc Kern
I need to know how to make that sum show as a 0 if it is NULL.
Here's a simpler version of the main query - how can I modify this to replace Nulls with 0?
[tt]
SELECT [Jobs Query].fpartno, Sum(qryMatTotTot.MaterialTot) AS MaterialTot
FROM ([Jobs Query] LEFT JOIN qryMatTotTot ON ([Jobs Query].fpartno=qryMatTotTot.fpartno) AND ([Jobs Query].fjob_so=qryMatTotTot.fjobno))
GROUP BY [Jobs Query].fpartno;
[/tt]
Cheryl dc Kern