This is the code
I want to see sum of the numbers in this texts. My expectation result is 555.
You shouldn’t do this in T-SQL, but anyway you still could if you wanted to:
with basedata (data) as ( select * from string_split('QWXWX/50,GNTGHNT/5,F/500',',') ) select sum(cast(replace(data, rtrim(translate(data, '0123456789',space(10))), '') as int)) from basedata;