jamescullis
Registered User.
- Local time
- Today, 21:07
- Joined
- Jun 2, 2014
- Messages
- 38
looking for some help, please.
I've got 4 fields
[firstName] [Firstname_formal] [Lastname] [Lastname_formal]
Some users will have a formal name (could be one or both) but prefer to be called something different.
John | Soon | Downer | Tzvetozar
Pam | Pamila | Downer |
Jan | | Smith | Jones
Fred | Ivan | Downer |
I want to construct a query that will use
- If the firstName_formal exists, use that
else use firstName
eg. the first persons realname is "Soon Tzvetozar", their preferred name is "John Downer".
- If the Lastame_formal exists, use that
else use Lastname
eg. the second persons realname is "Pamila Downer", their preferred name is "Pam Downer".
eg. the third persons realname is "Jan Jones", their preferred name is "Jan Smith".
eg. the forth persons realname is "Ivan Downer", their preferred name is "Fred Downer".
I've attached a demo DB
any ideas?
I've got 4 fields
[firstName] [Firstname_formal] [Lastname] [Lastname_formal]
Some users will have a formal name (could be one or both) but prefer to be called something different.
John | Soon | Downer | Tzvetozar
Pam | Pamila | Downer |
Jan | | Smith | Jones
Fred | Ivan | Downer |
I want to construct a query that will use
- If the firstName_formal exists, use that
else use firstName
eg. the first persons realname is "Soon Tzvetozar", their preferred name is "John Downer".
- If the Lastame_formal exists, use that
else use Lastname
eg. the second persons realname is "Pamila Downer", their preferred name is "Pam Downer".
eg. the third persons realname is "Jan Jones", their preferred name is "Jan Smith".
eg. the forth persons realname is "Ivan Downer", their preferred name is "Fred Downer".
I've attached a demo DB
any ideas?