title: MySQL - Load Data Infile with variable path
body: <p>I'm having a problem with setting a variable path for putting data into my table.
  This is how i build my path:</p>
  
  <pre><code>SET @path1 = CONCAT('C:/Projekte/Metrics/DXL_CSV_EXPORT_DATA/', YEAR(NOW()), '_',    MONTH(NOW()), '_', DAY(NOW()), '%', '/_','BeMiko/');`
  </code></pre>
  
  <p>Every day another Folder is created on the server. I want to automatically import the information from the .csv files from inside these folders each day.</p>
  
  <p>I import data from files with:</p>
  
  <pre><code>LOAD DATA INFILE 
  path...
  IGNORE INTO TABLE table1 FIELDS TERMINATED BY ';' ENCLOSED BY '"'
  LINES TERMINATED BY '&lt;*line_end*&gt;\r\n' IGNORE 1 ROWS;
  </code></pre>
  
  <p>How do i use the string inside my @path1 variable as path?
  Or if this is not possible: Are there other ways to solve this problem?</p>