title: How do I extract only the second word of a string in SQL?
body: <p>I'm trying to figure out how to just show the second word in the vendor name, but I keep getting an error with the following code:</p>
  
  <pre><code>SELECT SUBSTR(
  SUBSTR(vendor_name,CHARINDEX(' ',vendor_name)+1,len(vendor_name)),1,CHARINDEX(' ',
  SUBSTR(vendor_name,CHARINDEX(' ',vendor_name)+1,len(vendor_name)))
  )
  FROM vendors
  </code></pre>
  
  <p>Can someone help please</p>