title: Split String Teradata SQL
body: <p>I'm looking to split a string in Teradata.</p>
  
  <p>The table might look something like this.</p>
  
  <pre><code>column1
  hello:goodbye:afternoon
  </code></pre>
  
  <p>I'm trying to use SUBSTRING and INSTR to extract specific words.  So, say I want to select "goodbye". I'm trying the following query. </p>
  
  <pre><code>SELECT SUBSTRING(a.column1 from index(a.column1,':')+1 for INSTR(a.column1,':',0,2))
  FROM db.table as a
  </code></pre>
  
  <p>I get the following error.</p>
  
  <pre><code>SELECT Failed. [3707] Syntax error, expected something like ')' between the word 'INSTR' and '('
  </code></pre>
  
  <p>I'm not sure why I'm getting that error.  It lets me use INDEX to deduce a number in place of INSTR, so I'm not sure why it is acting this way when I use INSTR.</p>