Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return zero

Status
Not open for further replies.

linda55

Technical User
Jun 22, 2001
19
0
0
US
Can anyone tell me how to alter this so I get a zero when there are no entries to sum
TRANSFORM Sum([Daily Entries].Credit) AS [The Value]
SELECT [Daily Entries].RevNo, Sum([Daily Entries].Credit) AS [Total Of Credit]
FROM [Daily Entries]
WHERE ((([Daily Entries].AcctNo)=".08"))
GROUP BY [Daily Entries].RevNo, [Daily Entries].AcctNo
PIVOT Format([Date],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

I have looked in keyword search and can't find enough help for my limited knowledge. I would really appreciate your help.
 
Sum(iif([Daily Entries].Credit is not null,[Daily Entries].Credit,0)) AS [Total Of Credit]

basic syntax
iif (expression, true, false)


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top