title: Case-sensitive variable / string literal comparison in Stored Procedure
body: <p>I need to do a case sensitive comparison within a stored procedure in SQL Server 2008 but cannot work out how to achieve it. </p>
  
  <p>I have tried the following code:</p>
  
  <pre><code>Declare @andJob  varchar(1)
  
  select @andJob = (SELECT szUserdefined6 from inserted ) 
  
  if  @andJob like 'y%'
  begin
    /* Do Stuff */
  end
  </code></pre>