I have the following string.
Input -------------- 2030031469-NAI
To get the numeric part, I am using the following script
In case your string start with alphabet and end with number like ERT-123
you can use this query:
(select substring(@str,patindex('%[0-9]%', @str),len(@str)))