26/08/2015, 16:10
|
| | Fecha de Ingreso: enero-2013
Mensajes: 64
Antigüedad: 11 años, 11 meses Puntos: 0 | |
Respuesta: Load Data Local Infile reemplaza Null por Cero Muchas gracias.
Estoy utilizando el siguiente codigo, pero me esta generando unos errores. Voy a intentar solucionarlo.
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) |