Alright, here's the situation. I've got a text file exported from some DBMS that I don't have access to, and I need to import it into a MySQL DB. It's not tab-delimited; it's space separated based on available characters in fields.
However, the interesting problem is lines this..
When the DBMS they use exported the date fields, it truncated it if there was a double digit in the month and day, and then slapped the remainder on a second line, spaced over to the matching date field area (and somehow the Code tag is borking it).
It's also doing this with certain names.
So, I need to figure out how to get the truncated year & names put back together before I make it CSV to import into MySQL.
Also, this file has over 28,000 lines, so manual correction is a no-go.. plus, we've got to to be able to replace the database with an updated one every 6 months to a year.
Any suggestions are welcome. I've never been much of a RegEx guru, and I just don't have time to sift through this. Was hoping one of my fellow IT people would be able to help me out on this solution. I'll give you a free copy of one of my albums or something in exchange to whomever's solution I use (even if it's just some pseudocode that leads me in the right direction).
However, the interesting problem is lines this..
Code:
STU DISCO M D-XXX-6 11/15/199 6/26/1925 YES 7003
1
When the DBMS they use exported the date fields, it truncated it if there was a double digit in the month and day, and then slapped the remainder on a second line, spaced over to the matching date field area (and somehow the Code tag is borking it).
It's also doing this with certain names.
So, I need to figure out how to get the truncated year & names put back together before I make it CSV to import into MySQL.
Also, this file has over 28,000 lines, so manual correction is a no-go.. plus, we've got to to be able to replace the database with an updated one every 6 months to a year.
Any suggestions are welcome. I've never been much of a RegEx guru, and I just don't have time to sift through this. Was hoping one of my fellow IT people would be able to help me out on this solution. I'll give you a free copy of one of my albums or something in exchange to whomever's solution I use (even if it's just some pseudocode that leads me in the right direction).