Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
oahu9872
Posting Yak Master
112 Posts |
Posted - 2005-10-07 : 14:50:49
|
I am running an Access Query that combines three fields (First Name, Middle Initial, Last Name) into one field called SubName. The names are used for a log in system, but my problem is that when the middle initial field is null it leaves three spaces inbetween the first and last name of the subscriber, and won't recognize the name on login. This is my code right now...SUBNAME: [FIRST_NAME] & " " & [MIDDLE_NAME] & " " & [LAST_NAME]Is there anyway to put an if statement around the middle name to be used only when it is not null? Thanks. |
|
Hyukevain
Yak Posting Veteran
66 Posts |
Posted - 2005-10-07 : 17:05:31
|
SUBNAME: [FIRST_NAME] & Nz(" " & [MIDDLE_NAME] & " ", " ") & [LAST_NAME] |
 |
|
|
|
|