I have a string like prop234 the alphabet part has fixed length but the numeric part may be of any length
I have to get the numeric part from the string in T-SQL (on SQL Server 2008)
I tried with SUBSTRING function but I don't know the length of the numeric part so can't provide third parameter i.e. length
SUBSTRING ( expression ,start , length )
I know the start index but length can be anything
One solution is
SELECT substring([ColumnName], 5, LEN(ColumnName) - 4)
as start index is fixed i.e. length of alphabet part is 4 (fixed)
Is there any better solution for this and what if the length of alphabetic part is not constant?