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!

to concat first and last name

Status
Not open for further replies.

arravalli12

Programmer
May 3, 2005
62
US
I want to concat first and last name from table a with space between eg; john smith. This works good in oracle but I do not know how this works in ansi sql..

The query is: select concat( firstname, lastname) from A.
My result should be John smith.

Can any one help me out...
thanks
 
Like this.
Code:
select firstname + ' ' + lastname
from A

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
Thanks Denny. This worked perfectly. So simple but lack of knowledge on my side.
Thanks once again...
 
Sorry, force of habit.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top