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 |
|
sqlchiq
Posting Yak Master
133 Posts |
Posted - 2008-08-14 : 15:00:28
|
| if u had "Gaylord Palms Saturday" in a column how would you go about displaying just gaylord palmsim trying to do left(column, len(column)- 'length for saturday')but i dont know how to do that last 'length for saturday' partkeep in mind that saturday could be wednesday or anydayis there another way to do it? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-14 : 15:04:22
|
| SELECT REVERSE(SUBSTRING(REVERSE(yourcolumn),CHARINDEX(' ',REVERSE(yourcolumn))+1,LEN(yourcolumn))) |
 |
|
|
sqlchiq
Posting Yak Master
133 Posts |
Posted - 2008-08-14 : 15:30:47
|
| now im trying to display only saturday (or whatever day) in a new calculated fieldim tryingselect reverse(LEFT(reverse(location), CHARINDEX(' ', reverse(location) - 1)))from gaylordhotelbut no dice |
 |
|
|
|
|
|