Dumb question, but can't seem to find a quick answer... I am creating UDF to replace name prefix with a nested replace... something like this:
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
@Name
, 'Mr ', '')
, 'Mrs ', '')
, 'Ms ', '')
, 'Dr ', '')
, 'Mr. ', '')
, 'Mrs. ', '')
, 'Ms. ', '')
, 'Dr. ', '')
but want to replace those containing a '.' BEFORE those without. What's the order/hierarchy of nested replace? TIA, Danny

PARSENAME(@name, 1)which will lop off everything before the.character. Example here. This will be a LOT less expensive than a million nested replaces or a UDF for that matter.