If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
New to If statements
I have a query with service numbers and volumes. What I need is if the
service number = 107, 109, or 105, sum volumes., otherwise show 0. -- S- |
#2
|
|||
|
|||
New to If statements
swillems wrote:
I have a query with service numbers and volumes. What I need is if the service number = 107, 109, or 105, sum volumes., otherwise show 0. select ..., sum(iif([service number] in (107,109,105),volumes,0) as SumOfVolumes ... -- HTH, Bob Barrows |
#3
|
|||
|
|||
New to If statements
PERHAPS you want.
SUM(IIF([ServiceNumber] in (105,107,109),[Volume],Null)) Difficult to say without more detail on what you are attempting to do.n John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County swillems wrote: I have a query with service numbers and volumes. What I need is if the service number = 107, 109, or 105, sum volumes., otherwise show 0. |
Thread Tools | |
Display Modes | |
|
|