IIF Query Help

J

Jim

I am trying to use the following two IIF statements in a query and the "like
part of the statement is not working.

column one MTD_Qty_Merch: Sum((IIf([Selection#] Like
"MH8-6????",[Quantity],0)))

and column two MTD_Qty_Music: Sum((IIf([Selection#] Not Like
"MH8-6????",[Quantity],0)))

In previous queries using a = to value works correctly. But here I need the
wildcarding.

Thanks,
 
D

Douglas J. Steele

What about

Sum((IIf(Left([Selection#], 5) = "MH8-6",[Quantity],0)))

and

Sum((IIf(Left([Selection#], 5) <> "MH8-6",[Quantity],0)))
 

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

Top