I'm trying to create a query that contains several Iif statements. I have a total of 14 within the query. When I add one more - it gives me the "Too Complex" error.
I only need to add one more and I have no clue as how to call a function from a query.
Can anyone help? Here's my sql:
Premium Type: IIf([Prem_Type] Like "ADDASO*","ASO Premium",IIf([Prem_Type]
Like "AOLIFEASO*","ASO Premium",IIf([Prem_Type] Like "LIFEASO*","ASO
Premium",IIf([Prem_Type] Like "LTDASO*","ASO Premium",IIf([Prem_Type] Like
"OPTLIFEASO*","ASO Premium",IIf([Prem_Type] Like "SUPPADDASO*","ASO
Premium",IIf([Prem_Type] Like "SUPPLIFEASO*","ASO Premium",IIf([Prem_Type]
Like "VOLADDASO*","ASO Premium",IIf([Prem_Type] Like "DENTALASO*","Stop Loss
Premium",IIf([Prem_Type] Like "FBAASO*","Stop Loss Premium",IIf([Prem_Type]
Like "MEDICALASO*","Stop Loss Premium",IIf([Prem_Type] Like "PCSASO*","Stop
Loss Premium",IIf([Prem_Type] Like "STDASO*","Stop Loss
Premium",IIf([Prem_Type] Like "VISIONASO*","Stop Loss Premium","Fully
Insured"))))))))))))))
I want to add -
IIf([Prem_Type] Like "LUMP SUM*","Acct Adj",
I only need to add one more and I have no clue as how to call a function from a query.
Can anyone help? Here's my sql:
Premium Type: IIf([Prem_Type] Like "ADDASO*","ASO Premium",IIf([Prem_Type]
Like "AOLIFEASO*","ASO Premium",IIf([Prem_Type] Like "LIFEASO*","ASO
Premium",IIf([Prem_Type] Like "LTDASO*","ASO Premium",IIf([Prem_Type] Like
"OPTLIFEASO*","ASO Premium",IIf([Prem_Type] Like "SUPPADDASO*","ASO
Premium",IIf([Prem_Type] Like "SUPPLIFEASO*","ASO Premium",IIf([Prem_Type]
Like "VOLADDASO*","ASO Premium",IIf([Prem_Type] Like "DENTALASO*","Stop Loss
Premium",IIf([Prem_Type] Like "FBAASO*","Stop Loss Premium",IIf([Prem_Type]
Like "MEDICALASO*","Stop Loss Premium",IIf([Prem_Type] Like "PCSASO*","Stop
Loss Premium",IIf([Prem_Type] Like "STDASO*","Stop Loss
Premium",IIf([Prem_Type] Like "VISIONASO*","Stop Loss Premium","Fully
Insured"))))))))))))))
I want to add -
IIf([Prem_Type] Like "LUMP SUM*","Acct Adj",