title: Extracting from text using tsql
body: <p>I have the following string format in a Sql table column</p>
  
  <p><code>[CID]: 267 [MID]: 319A [Name]: RJR</code></p>
  
  <p>How can I extract only the value of MID which is 319A in select query so I can use the MID in a join.
  In other words I need to extract the MID value from this text field to use it in a join. I copy/pasted the value and it looks like there are /n (new line) characters after each value.</p>
  
  <p>Thanks in advance</p>