title: Conversion failed when converting the nvarchar value '20,21' to data type int
body: <pre><code>SELECT     SUM(PayAmount)
  FROM          TeacherPayment_Detail
  WHERE      TeacherPaymentId IN (TeacherPayment.Advance_IDs)
  </code></pre>
  
  <p>i want the sum up of advance taken by a teacher by this query. where <code>Advance_IDs</code> are Id's of recods of advance taken by teacher. but sql giving following error.</p>
  
  <pre><code>Conversion failed when converting the nvarchar value '20,21' to data type int.
  </code></pre>
  
  <p>note that if <code>Advance_IDs</code> has one value then error not occure this error occure on more then one value
  I explored for conversion the nvarchar to int by splitting function but i don't found the functions of my requirements.</p>