I have a query with code below:
SELECT [Daily Sale Details Extended].[Sold Date], [Daily Sale Details Extended].[Selling Tool] AS Tool, Products.[Product Name] AS Product, [Daily Sale Details Extended].Quantity AS QTY, [Daily Sale Details Extended].[Extend Price] AS Price, [Daily Sale Details Extended].[Shipping Charge] AS Shipping, [Daily Sale Details Extended].Profit, [Daily Sale Details Extended].Percentage, [Daily Sale Details Extended].[Item#/Order ID], [Daily Sale Details Extended].Cost, [Daily Sale Details Extended].[Total cost]
FROM [Daily Sale Details Extended] INNER JOIN Products ON [Daily Sale Details Extended].[Product ID] = Products.ID
WHERE ((([Daily Sale Details Extended].Sold)=Yes Or ([Daily Sale Details Extended].Sold)=Yes))
ORDER BY [Daily Sale Details Extended].[Sold Date] DESC , [Daily Sale Details Extended].[Selling Tool], Products.[Product Name];
If the profit is negative, the Percentage will display #Div/0!. How can make the percentage field display 0 instead of #Div/0!?
Thanks in advance.
SELECT [Daily Sale Details Extended].[Sold Date], [Daily Sale Details Extended].[Selling Tool] AS Tool, Products.[Product Name] AS Product, [Daily Sale Details Extended].Quantity AS QTY, [Daily Sale Details Extended].[Extend Price] AS Price, [Daily Sale Details Extended].[Shipping Charge] AS Shipping, [Daily Sale Details Extended].Profit, [Daily Sale Details Extended].Percentage, [Daily Sale Details Extended].[Item#/Order ID], [Daily Sale Details Extended].Cost, [Daily Sale Details Extended].[Total cost]
FROM [Daily Sale Details Extended] INNER JOIN Products ON [Daily Sale Details Extended].[Product ID] = Products.ID
WHERE ((([Daily Sale Details Extended].Sold)=Yes Or ([Daily Sale Details Extended].Sold)=Yes))
ORDER BY [Daily Sale Details Extended].[Sold Date] DESC , [Daily Sale Details Extended].[Selling Tool], Products.[Product Name];
If the profit is negative, the Percentage will display #Div/0!. How can make the percentage field display 0 instead of #Div/0!?
Thanks in advance.