Dear Scott:
SELECT Left(Address, 1)
& IIf(instr(address, " ") > 0,
Mid(address, instr(address, " ") + 1, 1), "")
AS YourColumn
FROM YourTableName
You may require more. Do you want middle initials?
The specification for this is to find the first letter of the first two
words. A word is defined as starting at the beginning of the column and
after the first space in the column.
There are things that would "fool" this:
- the column starts with a space (you could trim to avoid this)
- there are two spaces between words (many such complexities would move this
into the realm where it's better to write your own function to fully perform
this.)
- What do you want for O'Neal or McKinney? O and M?
Tom Ellison