Hi everyone hope you are all well.
Guys Id like to find a way of importing a text file into a mysql table so that i can prepopulate it with data.
My current way of doing this is with MySQL Query Browser as follows...
insert into currenttasks_ctk (name_ctk, fk_id_pro_ctk, description_ctk) values
('Create Business Case Document', 1, 'In Progress'),
('Fly to Perth', 1, 'Next Week'),
('Attend Tivoli Training', 1, 'Speak to manager');
The above would insert 3 rows into the table 'currenttasks_ctk'
I now have a text file that I wish to do the exact same thing as above.
It is comma delimited and is the following...
==========================
==========
==========
==========
==== currenttasks_ctk.txt
'Create Business Case Document', 1, 'In Progress',
'Fly to Perth', 1, 'Next Week',
'Attend Tivoli Training', 1, 'Speak to manager',
'Speak to DB Guys for UNIX', 1, 'Mid May',
'Alter the Polling schedule', 1, 'By Friday',
'Book tickets for flights', 2, 'Booked',
'Commence rollout for Darwin', 2, 'On Hold',
'Complete DRP Design Document', 3, 'Done',
'Change Backup Schedule', 3, 'Done',
'Build New Fleet Management Server', 4, 'Waiting on Hardware',
'Update the VI3 Schedule', 5, 'To Start',
'Complete SA V2Vs', 5, 'Nearly Done',
'Audit all PS3 Servers', 6, 'Only WA to complete',
'Complete Network Scan of NSW', 7, 'Contact NSW IT Manager',
'Investigate VIC Login Scripts for Stores', 8, 'Finished',
========================= eof
For each row above, each comma separated item belongs to the following fields in currenttasks_ctk:
name_ctk, fk_id_pro_ctk, description_ctk
Any help on trying to import this text file into table currenttasks_ctk would be much appreciated.
Start Free Trial