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 |
|
Ken Blum
Constraint Violating Yak Guru
383 Posts |
Posted - 2005-03-24 : 15:23:53
|
| charfield = "This is word four". What function can I use to return the last word of a char column? |
|
|
Ken Blum
Constraint Violating Yak Guru
383 Posts |
Posted - 2005-03-24 : 15:34:12
|
| Never mind - found Reverse function. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-03-25 : 08:27:10
|
| declare @var varchar(100)set @var='This is word four'select reverse(left(reverse(@var),charindex(' ',reverse(@var))-1))MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|