switch vs. iif process time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a big difference in execution of a general iif statement and the
Switch statement?
 
Probably not, but the only way to tell is to test. Have you tested?

And what do you mean by a "big difference"? It it takes 3 milliseconds to
get a value with Switch and 2 milliseconds to get the value with IIF unless
you are talking 100,000 or more records, no human would notice the
difference.
 
I agree with John. I would go for the more maintainable solution which might
not include Switch() or nested IIf()s.
 
Back
Top