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.
 

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

Back
Top