Including an expression in a query
Posted on 2013-06-11
I would like to create a computed field in a query design window that evaluates an expression which will output a value depending on the value of another field.
For instance, if the value of the field [Exp Grad] is "2139", it should output the value "December 2013". If the value is "2132", then it should output May 2013 and, finally, if the output is "2134", it should output "August 2013". For the last digit, "9" stands for December, "2" stands for May and "4" stands for August. The first three digits, e.g., 213 stands for the year (with the zero omitted), i.e., 2013.
How can I accomplish this, e.g., using the IIf or any similar expression?