title: How to convert varchar to numeric to use in WHERE clause
body: <p>I have this table that is storing information of employee. The datatype of Id is bigint. Now in code when developer is sending me IDs to extract data against, he's sending me in string format as apparently he cannot pass this <code>453, 454</code> into integer field. Is there anyway to convert this into bigint so I could use this into IN operator.</p>
  
  <pre><code>DECLARE @string varchar(25) = '453, 454'
  SELECT FirstName+' '+LastName Employee FROM Employee WHERE ID IN (CAST(@string AS BIGINT))
  </code></pre>
  
  <p>When I run this query I'm getting following error. Hope someone could help.</p>
  
  <pre><code>Msg 8114, Level 16, State 5, Line 2
  Error converting data type varchar to bigint.
  </code></pre>