Exportar consulta SQL a un fichero csv

Posted on abril 10th, 2016 by admin

select, users.usr, callrates.extension, callrates.destination, callrates.calldate, callrates.duration, callrates.description, callrates.stablishment, callrates.rate INTO OUTFILE '/tmp/export_201603.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' FROM callrates, users WHERE and year(calldate) = 2016 AND month(calldate) = 03;

No hay opción de exportar la cabecera.

This entry was posted on diumenge, abril 10th, 2016 at 23:18 and is filed under bbdd. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Response

« »

guy fawkes