I need to replace a phone string with punctuation inside and then convert it to int value.
I try to perform this query but i get all null because of the use of 'try_convert'.
Select replace(replace(replace(replace(replace(replace(phone, '-', ''), '(', ''), ')', ''), ' ',''), '0',''), '.', '') as phone, TRY_CONVERT (int, phone)
From sales. Customers