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 |
cplusplus
Aged Yak Warrior
567 Posts |
Posted - 2012-12-27 : 17:44:48
|
Can you please provide reverse sub string capturing from right 2 charecters/digits:it can be 5 digit or 6 digit data, want to capture the right side 2 digits.example: 72509 123110after extract: it should be: 09 , 10Thank you very much for the helpful info. |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2012-12-27 : 18:05:36
|
You can just grab the last 2SELECT RIGHT(digits,2) or if digits is a numberSELECT RIGHT(convert(varchar(6),digits),2)JimEveryday I learn something that somebody else already knew |
|
|
|
|
|