How to get the numeric part from a string using T-SQL? May 3, 2023 by Tarik select left(@str, patindex('%[^0-9]%', @str+'.') - 1)