title: Get value between 2nd and 3rd comma
body: <p>I am trying to extract the state from an address where everything is in one column, heres an example:</p>
  
  <pre><code>2901 MAIN ST,CORNING,NY,14830
  </code></pre>
  
  <p>I have been trying to figure out how to do it with the <code>substr</code> and <code>instr</code> together, but I cant seem to get the hang of <code>instr</code>. Here is what I have so far:</p>
  
  <pre><code>select substr('hello,hello,NY,11725-1234',1,instr('hello,hello,NY,11725-1234',',',2,3))
  from dual;
  </code></pre>
  
  <p>I thought it would start at the second comma and end at the 3rd and get my everything in between, but that doesnt seem to be the case. </p>
  
  <p>Any help is appreciated.</p>