title: IF OR THEN in SQL Server
body: <p>I did some Googling and made some progress, but I can't seem to get the syntax right. I think it should be something like this:</p>
  
  <pre><code>SELECT
      IF(Substring(dbo.LIMIT_HIST.ID,8,5) = '.0010' OR
      Substring(dbo.LIMIT_HIST.ID,8,5) = '.0020' 
      Left(dbo_LIMIT_HIST.ID,18),"")) AS IDs
  FROM
      dbo.LIMIT_HIST INNER JOIN
      dbo.CUSTOMER ON 
      dbo.LIMIT_HIST.LIABILITY_NUMBER = dbo.CUSTOMER.CUSTOMER_CODE
  </code></pre>
  
  <p>Can someone give me a push in the right direction?
  Thanks!</p>