title: SQL Comparing nchar to string
body: <p>I have two columns:</p>
  
  <ul>
  <li>id (nchar)</li>
  <li>name (varchar)</li>
  </ul>
  
  <p>Something simple just can't figure out how.</p>
  
  <pre><code>    select *
      from plant.carrier
      where carrier_id like 'NT'
  </code></pre>
  
  <p>This gives an expression error</p>
  
  <pre><code>      SELECT *
        FROM plant.carrier
        WHERE RTrim(CAST([carrier_id] As VarChar) = 'NT'
  </code></pre>
  
  <p>id column</p>
  
  <p><img src="https://i.stack.imgur.com/muIsJ.png" alt="enter image description here"></p>
  
  <pre><code>CREATE TABLE [plant].[carrier](
      [carrier_id] [nchar](4) NOT NULL,
      [name] [nvarchar](30) NOT NULL,
   CONSTRAINT [PK_carrier] PRIMARY KEY CLUSTERED 
  (
      [carrier_id] ASC
  )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS =enter code here ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
  ) ON [PRIMARY]
  GO
  </code></pre>