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 |
|
InNomina
Starting Member
40 Posts |
Posted - 2012-02-22 : 17:28:05
|
| I have 4 columns in 1 tableFirstMiddleLastFullI would like to combine the first 3 in the fourth i.e.Bush, George WalkerWould I Concatenate this?-------------------------"If you never fail, you're not trying hard enough" |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-22 : 17:37:36
|
| [code]UPDATE tableSET Full = First + COALESCE(' ' + Middle,'') + COALESCE(' ' + Last,'')[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-02-22 : 17:38:11
|
isnull(Last + ', ' , '') + isnull(First, '') + ' ' + isnull(Middle, '') KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
InNomina
Starting Member
40 Posts |
Posted - 2012-02-22 : 18:59:34
|
| Thank you both, I now have it working!!-------------------------"If you never fail, you're not trying hard enough" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-23 : 09:06:58
|
| welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|