DECLARE @input VARCHAr(500)='abc--------def--------xyzi---------pq'


Select REPLACE(REPLACE(REPLACE(@input,'-','{}'),'}{',''),'{}','-')