Randomly capitalize half of a string

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla Meta

Q&A about the site for Joomla! administrators, users, developers and designers

use master
DECLARE @ varchar(max)='codegolf'

SELECT top(len(@)/2)@=stuff(@,number+1,1,upper(substring(@,number+1,1)))FROM
spt_values WHERE number<len(@)and'P'=type
ORDER BY newid()PRINT @

Enter Parameters

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