Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

This challenge is to reverse the order of words within a sentence.

TSQL Beginners Challenge 15 - Reverse the order of words within a sentence

Solution to TSQL Beginners Challenge 15

Aug 18 2011 5:58AM by chaithu559   

Solution to TSQL Beginners Challenge 15

;with cte
as
(
select id,Sentence as OrginalSentence,Sentence+' ' as loopsentence,
Convert(varchar(1000),'') as ReversedSentence from @t
union all
select c.ID,OrginalSentence,
SUBSTRING(loopsentence,charindex(' ',loopsentence,1)+1,LEN(loopsentence)),
Convert(varchar(1000),SUBSTRING(loopsentence,1,charindex(' ',loopsentence,1)-1)+' '+ReversedSentence)
 from cte c
  where CHARINDEX(' ',loopsentence,1)<>0
)select distinct id,OrginalSentence,ReversedSentence as ReversedSentence From cte where loopsentence=''

Tags:


chaithu559
350 · 0% · 116
0
Liked



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]