Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/08/2015, 16:15
facundojr07
 
Fecha de Ingreso: enero-2013
Mensajes: 64
Antigüedad: 11 años, 10 meses
Puntos: 0
Respuesta: Load Data Local Infile reemplaza Null por Cero

Solucionado!

LOAD DATA LOCAL INFILE './tmp/proc.$archivo'
INTO TABLE Estadisticas.INT_30m
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
(TIME, RNC, Periodo, INT, @VS_INT_CFG_INTERWORKING_FAIL_NUM, @VS_INT_CFG_INTERWORKING_NUM, @VS_INT_CPULOAD_LESS, @VS_INT_CPULOAD_MAX, @VS_INT_CPULOAD_MEAN, @VS_INT_CPULOAD_OVER, @VS_INT_TRANSLOAD_RATIO_MAX, @VS_INT_TRANSLOAD_RATIO_MEAN)
SET
VS_INT_CFG_INTERWORKING_FAIL_NUM = IF(@VS_INT_CFG_INTERWORKING_FAIL_NUM ='', NULL, @VS_INT_CFG_INTERWORKING_FAIL_NUM),
VS_INT_CFG_INTERWORKING_NUM = IF(@VS_INT_CFG_INTERWORKING_NUM = '', NULL, @VS_INT_CFG_INTERWORKING_NUM),
VS_INT_CPULOAD_LESS = IF(@VS_INT_CPULOAD_LESS = '', NULL, @VS_INT_CPULOAD_LESS),
VS_INT_CPULOAD_MAX = IF(@VS_INT_CPULOAD_MAX = '', NULL, @VS_INT_CPULOAD_MAX),
VS_INT_CPULOAD_MEAN = IF(@VS_INT_CPULOAD_MEAN = '', NULL, @VS_INT_CPULOAD_MEAN),
VS_INT_CPULOAD_OVER = IF(@VS_INT_CPULOAD_OVER = '', NULL, @VS_INT_CPULOAD_OVER),
VS_INT_TRANSLOAD_RATIO_MAX = IF(@VS_INT_TRANSLOAD_RATIO_MAX = '', NULL, @VS_INT_TRANSLOAD_RATIO_MAX),
VS_INT_TRANSLOAD_RATIO_MEAN = IF(@VS_INT_TRANSLOAD_RATIO_MEAN = '', NULL, @VS_INT_TRANSLOAD_RATIO_MEAN)