Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenating fields with potential null values 1

Status
Not open for further replies.

suemon

IS-IT--Management
Apr 8, 2005
30
GB
I am trying simply to concatenate three name fields in a lotus domino database. Any one, or potentially all three (though all three being blank is highly unlikely) may be blank but I still need them to be picked up.

For example the three fields are: salutation, first name, last name.
If I concatenate the three fields but the salutation field for a record happens to be blank, nothing gets picked up.

Alternatively, both salutation and last name might be blank.

Does anyone know how I can solve this problem?
 
If the fields can be null then try the following:

(if isnull({table.salutation}) then "" else {table.salutation} + " ") +
(if isnull({table.firstname}) then "" else {table.firstname} + " ") +
(if isnull({table.lastname}) then "" else {table.lastname})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top