Access problem - query with null fields
I have an aggregate query with the following joining:
Code:
SELECT qItem.referenceno, Sum(FolioItems.qty) AS SumOfqty, First(FolioItems.JACIF) AS FirstOfJACIF, First(qItem.description) AS FirstOfdescription, First(qItem.folioid) AS FirstOffolioid, Sum([qty]-[soldqty]) AS balance
FROM (qItem LEFT JOIN SoldItems ON qItem.ID = SoldItems.itemID) INNER JOIN FolioItems ON qItem.ID = FolioItems.itemID
GROUP BY qItem.referenceno;
qItem.ID is joined to SoldItems.ItemID : 2. Include ALL items from qItem and only those from SoldItems where the joined fields are equal.
qty and soldqty are both Total:sum and I have a field called balance: [qty]-[soldqty]
Now this gives me a table that shows each item and how many sold, however where none is sold I get a null value, and this also gives me a null value for balance. How do I resolve this?
.
PC - Ubuntu 15.04 64bit Desktop
HP Pav G60-236US 3GB RAM Laptop, Ubuntu 15.04 64bit and Win7 Home
"So Daddy, how come you telling me stealing not right when YOU copying DVDs? How come? How Come?"
RIP Ramesh ...