Ver Mensaje Individual
  #10 (permalink)  
Antiguo 07/06/2010, 11:09
ferranWEB
 
Fecha de Ingreso: enero-2002
Mensajes: 1.872
Antigüedad: 22 años, 4 meses
Puntos: 3
Respuesta: ordenar campo precio varchar

me sigue dando error: yo ejecuto:

UPDATE viviendas_esp
SET precio = CAST(REPLACE(REPLACE(precio,'.', ''),',','.') AS DECIMAL(20,2))

y me devuelve

MySQL ha dicho:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECIMAL(20,2))' at line 2

saludos