Results 1 to 2 of 2
Thread: Query IIF statement (2003)
2007-09-19, 22:16 #1
- Join Date
- Jan 2001
- Thanked 0 Times in 0 Posts
Query IIF statement (2003)
I have the following fields in a query: CL N, CL Name, Contracts, Members, COPC Code, ASO indicator. I am trying to define some Products - Sec Blue, Freedom Blue, Sig65, OtherAso, OtherNonAso. To define SecBlue (for example) the pseudo code would be - IIF COPC Code in 173, 2, 60, 81, 173,174,187, Members, else 0. Likewise for Freedom Blue, and Sig65 .
To define OtherAso and OtherNonAso, the pseudo code would be - IIF COPC Code not in (all the copc codes that define Sec Blue, Freedom Blue, Sig65) and Aso indicator = to Y if OtherAso and = N if OtherNOnAso. How would I define the If statements to define these fields? Thanks for any help you can provide.
2007-09-19, 22:41 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Query IIF statement (2003)
If I understand your description for Sec Blue correctly, try
Sec Blue: IIf([COPC Code] In (173,2,60,81,173,174,187),[Members],0)
and similar for Freedom Blue and Sig65.
I don't understand your description for OtherAso and OtherNonAso. You don't define what their values should be but state "... if OtherAso" <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>