title: How to sum just the decimal values from a string in SQL Server?
body: <p>I'm working with a system that sells products using Kiosks, these Kiosks receives both bills and coins. The payments made in the Kiosks are registered in the database like this:</p>
  <pre><code>Product cost $5
  </code></pre>
  <p>Customer inserts two bills of $2 and the rest in coins like 1 coin of 0.50, 2 coins of 0.20 and 1 coin of 0.10.</p>
  <p>In the database it show this in a nvarchar value:</p>
  <pre><code>(2,2,0.50,0.20,0.20,0.10)
  </code></pre>
  <p>It is a sum of all the bills and coins inserted in the Kiosk in just one field.</p>
  <p>I need to get and sum only the coins from this field. How do I do that in SQL Server?</p>
  <p>I know that it would be easier if the table divides the bills from coins but I have control over how these records are created.</p>
  <p>The table definition is:</p>
  <pre><code>KioskID INT 
  Payments nvarchar(250)
  PaymentCommited INT
  </code></pre>
  <p>In the example I gave above I want to sum all the coins and the expected value for field Payments would it be 1.</p>
  <p>I would be grateful for any help.</p>