First, let's setup the example table.
-- Create a table as an example
CREATE TABLE SortOrder
(
ID INT IDENTITY PRIMARY KEY,
[Text] VARCHAR(256)
)
GO
-- Insert rows into the table
INSERT INTO SortOrder ([Text])
SELECT ('Lorem ipsum dolor sit amet, consectetur adipiscing elit')
U...