How can I rename a file name using concat function? I want my file name to be dated, can anyone help me with this.
SET @OUTFILE = CONCAT( CONCAT('/xampp/htdocs/mysite/reports-', NOW()), '.csv');
SELECT * FROM `tbl_user` INTO OUTFILE @OUTFILE FIELDS TERMINATED BY ','ENCLOSED BY '"' LINES TERMINATED BY '\n'
source
share