Join Two Fields In Select Statement Results

crhodus

Registered User.
Local time
Today, 04:32
Joined
Mar 16, 2001
Messages
257
I'm sure this is easy to do, but I'm not sure how to word my search criteria when trying to look for a solution.


Let's say that I have 2 fields in MyTable: FirstName, LastName.

I've been trying to use the following query, but obviously it does not work:
Select (FirstName + ' ' + LastName) as MyName from MyTable.

I would like to have the following data returned to me in the following format:
John Doe
Jane Doe
Jim Doe
Jill Doe

Thanks,
CRhodus
 
Last edited:
Arhh!! The last name was not being displayed in the query results because there were trailing spaces after the first name. After widening the column and adding a RTRIM to my query it worked.

Thanks,
CRhodus
 

Users who are viewing this thread

Back
Top Bottom