Parsing names is generally fairly complex, and your programmers and dba should be sent out for a seminar on collecting data, and while they're out, have their badges deactivated.
Why you would have Jr as part of the First name is very odd, as it's usually listed after the Last name.
As examples, names can be:
John F. Kennedy Jr.
Oscar De La Hoya
So you probably need to code for the possibilities, and design better tables to include:
Prefix
First
Middle
Last
Suffix
and perform some training for data collection.
You might elaborate on LB's suggestion and get pretty close, as in:
whileprintingrecords;
stringvar first:="";
stringvar middle:="";
stringvar prefix:="";
stringvar suffix:="";
first := split({table.name}," ")[1];
if uppercase(split({table.name}," ")[ubound(split({table.name}," "))]) in ("JR","I", "II", "III", "IV", "V", "SR") then
suffix := split({table.name}," ")[ubound(split({table.name}," "))];
You may need to elaborate on the list of possible suffixes, but this will store the data into the proper variables of first and suffix, which you can later reference, or do so here.
Again, it's difficult to resolve bad data wihout lots of coding. I used to manage some hefty name and address lists and had created 1000's of lines of proprietary code to clean up names based on common names lists.
-k