Ver Mensaje Individual
  #10 (permalink)  
Antiguo 14/08/2014, 13:01
DJMABAKER
 
Fecha de Ingreso: agosto-2014
Mensajes: 5
Antigüedad: 9 años, 8 meses
Puntos: 0
Respuesta: Dividir 1 campo en dos campos

ingreso de esta forma:

Código MySQL:
Ver original
  1. ALTER  bd entrega pendientes medicmed_copy ADD COLUMN cantidad INT UNSIGNED NULL DEFAULT '0';
  2. UPDATE bd entrega pendientes medicmed_Copy
  3. SET cantidad = CAST(SUBSTRING_INDEX(MEDICMENTO_NO_1, '#', -1) AS UNSIGNED);
y me sigue apareciendo este error

Error Code: 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 'entrega pendientes medicmed_copy ADD COLUMN cantidad INT UNSIGNED NULL DEFAULT '' at line 1

muchas gracias por tu coloaboracion