Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Oli4
Starting Member
4 Posts |
Posted - 2010-12-31 : 14:47:28
|
| Hey, I am very new at SQL language and trying to lear it. But I wonder how you can put data from two colums for example: Lastname en firstname of person into one field/one column with a space in between them.Here today, gone tomorrow |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-12-31 : 15:36:35
|
| [code]SELECT firstName + ' ' + lastName as fullNameFROM yourTable[/code] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-04 : 12:49:37
|
if nullable fields then:-SELECT COALESCE(firstName + ' ','') + COALESCE(lastName,'') as fullNameFROM yourTable ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|