johnmerlino
Registered User.
- Local time
- Today, 01:03
- Joined
- Oct 14, 2010
- Messages
- 81
Hey all,
I have a record that looks like this:
APEL,RICHARD & RHINA
Notice the ampersand before the first name and notice there's another name after the last name, which is Apel. So I would like to account for this pattern. I come up with this:
But this could be pulling unnessary records, that is, records that don't match the pattern of the name I used as an example above. Any suggestions on how to refine the query?
Also Note it needs to account for middle names and that's why I included middle_initial field and if condition above.
Thanks for response.
I have a record that looks like this:
APEL,RICHARD & RHINA
Notice the ampersand before the first name and notice there's another name after the last name, which is Apel. So I would like to account for this pattern. I come up with this:
Code:
INSERT INTO possibles ( fullname )
SELECT Trim(Trim(temp_table.last_name) & "," & IIf(Trim(middle_initial) Is Null,"* &" & Trim(temp_table.first_name),"* &" & Trim(temp_table.first_name) & " ") & IIf(Trim(middle_initial) Is Null,"",Trim(middle_initial))) AS Expr1
FROM temp_table;
Also Note it needs to account for middle names and that's why I included middle_initial field and if condition above.
Thanks for response.