I have a string which is in 99999 124 fdsg format.
I want to replace the first space with - and the next space with a non-space. My expected result will look like this:
99999-124fdsg
To replace the first char I used this expression:
stuff(Product,charindex('',product),1,'-')as trim
Because I want to name the new column as trim. How can I do for the second character?