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

How to concatenate two text fields with space in between

Status
Not open for further replies.

ashishh

Programmer
Jul 19, 2002
43
US
I would like to print a concatenated "First Name" and "Last Name" with a space between. How can I achieve this?

Thanks,
Ashish
 
{table.firstname}+" "+{table.lastname}
 
I have tried this before. It does not work. To give a background, I am using this SQL Expression field in CR8.5 and want to print it this way.

FirstName LastName
 
Example:
{FirstName} + {LastName}

You have to put a space before and after +
 
That depends on the database, but if you're using the SQL Expression, it would likely be:

{table.firstname}+' '+{table.lastname}

It may also be that you need:

ltrim(rtrim({table.firstname}))+' '+{table.lastname}

(sorry if this posts multiple times, having problems today with connectivity)

-k
kai@informeddatadecisions.com
 
Yes. It does work. I had been trying to use with double quotes and that's what was not working.

Thanks for your help guys.

Ashish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top