Hi all. I need to insert data from a text file(on my local machine) into a mysql database table.I know that it can be done using 'LOAD DATA INFILE' command in mysql.However i am finding it difficult to parse the rows in my text file for the columns.My text file looks like this 16:01:46 up 5:25, 2 users, load average: 0.04, 0.22, 0.27 16:02:55 up 5:27, 2 users, load average: 0.13, 0.22, 0.27 I need to put them in 5 different fields in my table. Note that the row starts with a single blank space.After the first field(i.e. HH:MM:SS) there is a blank space character. After the second field there are two blank spaces. After the third field(H:MM) there is a comma(,) followed by two blank spaces.Same after that. Can anyone please help me to parse this pattern.
You may try this demo version http://www.ombelt.com/convert/txt2sql/download.html I hope it'll help you