Have a numeric nvarchar values with some "extra-symbols" For example 1/2, 9/6, 14A They allways starts with number.
How can I substring this "extra-symbols" values from start to index of first non-int character? The example line must be 1, 9, 14
Something like
SUBSTRING(Value, 0, CHARINDEX(Value, /*Here must be all symbols except numbers*/))
Please try the query:
SELECT LEFT(ColumnName,PATINDEX('%[^0-9]%', ColumnName+'a')-1) FROM TABLE