Special String reformatting

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @ varchar(max)='potato'
WHILE @+@ like'_[a-z]%'
SELECT @=concat(s,left(@,1),len(@)-len(s))FROM(SELECT
replace(@,left(@,1),'')s)s
PRINT @

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results