title: Getting an error: Argument data type varchar is invalid for argument 2 of substring function
body: <p>I'm trying to get a substring from the value of a column and I'm getting the following error <code>Argument data type varchar is invalid for argument 2 of substring function.</code></p>
  
  <p>The column type is NvarChar(50) and is a system column for an application, so I can't modify it. </p>
  
  <p>Ideally I'd just be able to select the substring as part of the query without having to alter the table, or create a view or another table. </p>
  
  <p>Here's my query</p>
  
  <pre><code>SELECT SUBSTRING(INVOICE__, ':', 1)
    FROM dwsystem.dbo.DWGroup
  </code></pre>
  
  <p>Im trying to select only everything in the string after a specific character. In this case the <code>:</code> character.</p>