title: MSSQL Server 2008 - Convert Nvarchar to numeric
body: <p>im using mssql 2008 and Im permanently failing to convert an nvarchar to numeric values.</p>
  
  <p>Can you please advise? I have different solutions I found over the www, but all of them are failing with the error message:</p>
  
  <blockquote>
    <p>Msg 8114, Level 16, State 5, Line 15 Error converting data type
    nvarchar to numeric.</p>
  </blockquote>
  
  <p>I have built an reduced example for demonstration purpose:</p>
  
  <pre><code>IF OBJECT_ID('tempdb..#temptable', 'U') IS NOT NULL 
  DROP TABLE dbo.#temptable 
  
  create table #temptable(
  col1 nvarchar(10),
  col2 numeric(10,5)
  )
  insert into #temptable values ('0,5','0')
  
  select *,convert(numeric(18,2),col1)   from #temptable
  
   UPDATE #temptable
   SET col2 = CAST(col1 AS numeric(10,5))
   WHERE ISNUMERIC(col1) = 1
  
  
  SELECT col1
  , CASE ISNUMERIC(col1)
  WHEN    1 THEN  CONVERT(numeric(18,2),col1)  
  ELSE 0.00
  END
  
  from #temptable
  </code></pre>