How do I post following text file to the MySql database?
banana 19 yellow25.4
pineapple789 1.0
orange orange
banana 12 yellow 25
Data format is always same:
name nnnnnnnnn (9 Chars); count ddd (3 digits); color nnnnnn (6 chars); dddd (4 digits with decimal)
Each record is terminated with an end-of-line character.
Looking for a command that will post above sample info (actual sample.txt has appx 20.000 records)
with correct Regex to my database tables.
Text file name: sample.txt
Database name: fruits ; Username: Admin ; Password: pass
Tablenames: name; count; color; weight
Thank you in advance
Sincerely: Suomi
(Program is variation of "Stock" database and sample.txt changes once a minute)
Code:
apple 245red 12.5 banana 19 yellow25.4
pineapple789 1.0
orange orange
banana 12 yellow 25
Data format is always same:
name nnnnnnnnn (9 Chars); count ddd (3 digits); color nnnnnn (6 chars); dddd (4 digits with decimal)
Each record is terminated with an end-of-line character.
Looking for a command that will post above sample info (actual sample.txt has appx 20.000 records)
with correct Regex to my database tables.
Text file name: sample.txt
Database name: fruits ; Username: Admin ; Password: pass
Tablenames: name; count; color; weight
Thank you in advance
Sincerely: Suomi
(Program is variation of "Stock" database and sample.txt changes once a minute)