How to reverse a string (SQL Server 2005, SET BASED)

Posted by Newbie on Stack Overflow See other posts from Stack Overflow or by Newbie
Published on 2010-06-17T08:49:27Z Indexed on 2010/06/17 9:03 UTC
Read the original article Hit count: 150

Filed under:

E.g.

Declare @str varchar2(20)
Set @str = 'A Student'
Select Reverse(@str)

Output:

tnedutS A

Expected being:

Student A

The output(using Reverse) is as expected. But my requirement is the one described.

Help needed with SET BASED.

I am using SQL Server 2005

© Stack Overflow or respective owner

Related posts about sql-server-2005