Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Declare @Test VarChar(20)
Set @Test = '80505'
Declare @Output VarChar(20)
-- Prepare a table variable to hold the digits
Declare @Digits Table(Digit Char(1))
-- Insert the digits in to the table variable
Insert Into @Digits
Select SubString(@Test, Number, 1) As Digit
From master..spt_values
Where Type = 'P'
And Number Between 1 And Len(@Test)
-- Concatenate the data in the table variable
-- in to a single string
Set @Output = ''
Select @Output = @Output + Digit
From @Digits As Digits
Order By Digit
Select @Output