Puoi creare una piccola funzione in SQL per invertire una stringa come di seguito:
DECLARE @source VARCHAR(MAX)
DECLARE @dest VARCHAR(MAX)
DECLARE @lenght INT
SET @source = 'We want to tell you we all love StackOverflow'
SET @dest = ''
WHILE LEN(@source) > 0
BEGIN
IF CHARINDEX(' ', @source) > 0
BEGIN
SET @dest = SUBSTRING(@source,0,CHARINDEX(' ', @source)) + ' ' + @dest
SET @source = LTRIM(RTRIM(SUBSTRING(@source,CHARINDEX(' ', @source)+1,LEN(@source))))
END
ELSE
BEGIN
SET @dest = @source + ' ' + @dest
SET @source = ''
END
END
SELECT @dest