Case statement in query ?

  • Thread starter Thread starter David
  • Start date Start date
D

David

I need to change the values returned by my query for a
certain column. I am reducing the values to a subset of
the original values by consolidating some values into one.
What is the best way to do this? Is there a CASE statement
I can use? My tests will need something like the LIKE
statement and also need to have an ELSE option.
 
Try the Switch() function, and use True to introduce the Else, e.g.:
Switch([Surname] like "A*", "Starts with A", True, "Didn't match")

If it's not powerful enough, you can write your own function and call that.
 
Back
Top