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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to create Full Name by using existing First Name and Last Name

Status
Not open for further replies.

Eswar75

Technical User
Jul 19, 2004
10
US
hi
I want to create Full Name object by using existing First Name and Last Name objects in BO Designer.My database is DB2.

thank u in advance
 
DB2 knows the concat-function in its SQL. So it would be something like:

CONCAT(TABLE.FORNAME,TABLE.SURNAME)
 
You may want to have a space between the names, like:

TABLE.FIRSTNAME||' '||TABLE.SURNAME

|| works usually as a concat function

T. Blom
Information analyst
tbl@shimano-eu.com
 
There are a couple of other points here.

Firstly, if any of the fields being concatenated 'contains' null, the resultant string is null, so it may me useful to coalesce the fields first (i.e. change Null to Space).

Secondly, it could be useful to RTRIM the fields to remove any trailing spaces ion each element, and then to put one space back as was suggested.

rtrim(coalesce(TABLE.FIRSTNAME,' ')||' '||coalesce(TABLE.SURNAME,' ')



 
Good additional points, Brian...

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top