title: Stored procedure to parse a string
body: <p>I need to write a stored procedure for which the input is a string.</p>
  
  <p>The input string contains variable names and their values separated by pipeline delimiter like this:</p>
  
  <pre><code>Name =Praveen | City=Hyderabad | Mobile=48629387429| Role=User| etc
  </code></pre>
  
  <p>In the stored procedure I have declared variables like <code>@x, @y, @z, @t</code> to obtain values as  </p>
  
  <pre><code>@x=Praveen (Name value)
  @y=Hyderabad (City Value)
  @z=48629387429(Mobile Value)
  @t=User(Role Value)
  </code></pre>
  
  <p>Also input string can have the values in any order like </p>
  
  <pre><code>City=Hyderabad | Mobile=48629387429 | Role=User | Name =Praveen |etc
  </code></pre>
  
  <p>Once I parse the values into <code>@x, @y, @z, @t</code> etc I have to use these values in the stored procedure.</p>
  
  <p>Kindly let me how I can parse the input string to obtain the values of <code>Name, City, Mobile, Role</code>  into <code>@x, @y, @z</code> and <code>@t</code> respectively.</p>