title: The type of column "" conflicts with the type of other columns specified in the UNPIVOT list - SQL Server 2008
body: <p>I have this query </p>
  
  <pre><code>SELECT 
      MUESTRAS, POZOS, PRIORITY, NAME, VALUE
  FROM 
      (SELECT 
           MUESTRAS, POZOS, PROJECTCODE, SAMPLETYPE,
           PRIORITY, CAST(VAR1 AS NVARCHAR(MAX)) AS VAR1, NUM1, NUM2 
       FROM 
           WS_LEYES_PTXT_PILAS_CALCULADAS) p
  UNPIVOT
     (VALUE FOR NAME IN
        (VAR1,-- Varchar maybe Null
         NUM1,-- Float
         NUM2)-- Float
  ) AS unpvt;
  </code></pre>
  
  <p>I tried  converting all variables but I have the same error</p>
  
  <p>Thanks! and rewards</p>