title: setting a parameter in a proc
body: <p>I am working or a report that you can enter a client number to view all the detail. I have been asked to to make a change where their can enter the client code or 0600 for all clients with the start name 'Jim Bob' or 0400 for clients name that start with 'Joe Bob' I had come up the the statement below but it does not work, can someone help me out. I am using sql 2008 </p>
  
  <pre><code>where case when (@ClientCode = 0600 then c.sClientName Like 'Jim Bob%')   else
  when (@ClientCode = 0400 then c.sClientName like 'Joe Bob%') else 
  c.sClientCode = @ClientCode)
  </code></pre>