title: SQL Server: Error converting data type nvarchar to numeric
body: <p>If I run the SQL query below; I get the following error: </p>
  
  <blockquote>
    <p>Error converting data type nvarchar to numeric.</p>
  </blockquote>
  
  <p><code>COLUMNA</code> contains only numbers (negative and positive) including fields with maximal up to two digits after the decimal and is stored as dot decimal.</p>
  
  <pre><code>IF OBJECT_ID('st00_TABLEA','U') IS NOT NULL DROP TABLE [st00_TABLEA]
  SELECT 
      COLUMNA AS COLUMNA_s
      ,CASE WHEN [COLUMNA] = '' THEN 0 ELSE CONVERT(NUMERIC(18,2),REPLACE([COLUMNA],',','.')) END AS COLUMNA
  INTO st00_TABLEA
  FROM dbosu.TABLEA;
  </code></pre>
  
  <p>I also tried the following, but still same problem:</p>
  
  <pre><code>IF OBJECT_ID('st00_TABLEA','U') IS NOT NULL DROP TABLE [st00_TABLEA]
  SELECT 
      COLUMNA AS COLUMNA_s
      ,CONVERT(DECIMAL(18,2),COLUMNA) AS COLUMNA
  INTO st00_TABLEA
  FROM dbosu.TABLEA;
  </code></pre>