Ok, I've got a txt file that is roughly 23,000 lines long. Each line at the maximum length is roughly 140 characters. Also, each line is seperated for entry into a database with a pipe | for entering data according to the proper field.
Here is an example:
NULL|+decimate.dll|+decimate.zip|252|0
NULL|00000030.DLL|00000030.ZIP|11|0
NULL|00003637.DLL|00003637.ZIP|50|0
NULL|00003639.DLL|00003639.ZIP|16|0
The fields in the table are:
+---------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+------------------+------+-----+---------+----------------+
| fileID | int(10) unsigned | | PRI | NULL | auto_increment |
| file_name | varchar(70) | YES | | NULL | |
| file_name_zip | varchar(70) | YES | | NULL | |
| file_size | int(10) unsigned | YES | | NULL | |
| dload | int(10) unsigned | YES | | NULL | |
+---------------+------------------+------+-----+---------+----------------+
Now, the problem with my text file is that it's not properly formatted. Here is an example of what I mean:
NULL|A32SP2FM.DLL|A32SP2FM.ZIP
|24|0
NULL|A32SPKR.DLL|A32SPKR.ZIP
|11|0
NULL|A32TANDY.DLL|A32TANDY.ZIP
|11|0
NULL|a3d.dll|a3d.zip
|324|0
NULL|a3dapi.dll|a3dapi.zip
|284|0
Is there a way that I can change the text to all be one line per row as it would be in a database without having to manually delete each empty row and space? Or, is there a command in mysql that I can enter these values with the format it's in now?
Thanks