I have this:
select iif(very long iif statement) as order_number, mid([a],1,2) as larry,more items
from ...
group by iif(very long iif statement), mid([a],1,2)
I get invalid procedure call
If I change it to
select iif(very long iif statement) as order_number, mid([a],1,2) as larry,more...