title: Convert alphanumeric varchar to int
body: <p>I am using this script </p>
  
  <pre><code>select * from mxiv_sentries where 
  attrname='mskeyvalue' and mskey in
  (select mskey from mxiv_sentries where attrname='MXREF_MX_PRIVILEGE' and searchvalue='672081'
  and mskey not in
  (select Default_login from mxman_rt_u.VPN))
  </code></pre>
  
  <p>these are two different tables where Default_login is alphanumeric and varchar and mskey is number in INT. So when i execute this script i end up with error: </p>
  
  <blockquote>
    <p>Msg 245, Level 16, State 1, Line 1 Conversion failed when converting
    the varchar value 'A15271' to data type int.</p>
  </blockquote>
  
  <p>Can you please suggest how to get proper results 
  Thanks</p>