Sum of Amount

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a query which sums the invoiced amounts on a purchase order. If
there is no invoiced amounts, it leaves a blank field. How do I write the
query so that the blank field is replaced with a zero (0)?

Thanks,
Shirley
 
The Nz function will replace Null to Zero

Nz([FieldName],0)

That might not be the case, but from your post I can't see which tables
involved or what is the join between them.

If you need more help, please post the SQL.
 
Thanks for the response, but it's not working. Here is the SQL:

SELECT [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], [PO Query].[Sum(amount)], [AP Query].[Sum Of Amount]
FROM [PO Query] LEFT JOIN [AP Query] ON [PO Query].[PO No] = [AP Query].[PO
No]
GROUP BY [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], [PO Query].[Sum(amount)], [AP Query].[Sum Of Amount];


Can you still help?
 
Have you tried

SELECT [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], nz([PO Query].[Sum(amount)],0), Nz([AP Query].[Sum Of
Amount],0)
FROM [PO Query] LEFT JOIN [AP Query] ON [PO Query].[PO No] = [AP Query].[PO
No]
GROUP BY [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], [PO Query].[Sum(amount)], [AP Query].[Sum Of Amount];

--
Good Luck
BS"D


Shirley said:
Thanks for the response, but it's not working. Here is the SQL:

SELECT [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], [PO Query].[Sum(amount)], [AP Query].[Sum Of Amount]
FROM [PO Query] LEFT JOIN [AP Query] ON [PO Query].[PO No] = [AP Query].[PO
No]
GROUP BY [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], [PO Query].[Sum(amount)], [AP Query].[Sum Of Amount];


Can you still help?
--
Shirley


Shirley said:
Hi,

I have a query which sums the invoiced amounts on a purchase order. If
there is no invoiced amounts, it leaves a blank field. How do I write the
query so that the blank field is replaced with a zero (0)?

Thanks,
Shirley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top