declare @SENTENCE_WORDS table(word varchar(max), position...


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 @SENTENCE_WORDS table(word varchar(max), position int)
insert into @SENTENCE_WORDS values ('World', 2), ('Hello', 1)
declare @sentence varchar(max) = ''
SELECT @sentence = @sentence + ' ' + word from  @SENTENCE_WORDS order by position
select @sentence

Enter Parameters

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