title: How to reverse a string in SQL Server
body: <p>I have a string in SQL stored in <code>@result</code> variable of type <code>Varchar(MAX)</code> like this:</p>
  
  <pre><code>Attributes &gt;&gt; Items &gt;&gt; Category &gt;&gt; Package
  </code></pre>
  
  <p>How can i get the reverse of this without impacting the performance of stored procedure .I want to break the string on the basis of <code>&gt;&gt;</code>.</p>
  
  <pre><code>Package &gt;&gt; Category &gt;&gt; Items &gt;&gt; Attributes 
  </code></pre>