|
cplusplus
Constraint Violating Yak Guru
481 Posts |
Posted - 12/27/2012 : 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 123110
after extract: it should be: 09 , 10
Thank you very much for the helpful info. |
Edited by - cplusplus on 12/27/2012 17:48:03
|
|
|
jimf
Flowing Fount of Yak Knowledge
USA
2868 Posts |
Posted - 12/27/2012 : 18:05:36
|
You can just grab the last 2 SELECT RIGHT(digits,2) or if digits is a number SELECT RIGHT(convert(varchar(6),digits),2)
Jim
Everyday I learn something that somebody else already knew |
 |
|