I would like to create a SQL INSERT query with a large CSV file I have. The problem is the names are not parsed out. They are listed as "John Doe" or "John B Doe" instead of "John" and "Doe" because I differentiate between first and last name (I am not concerned with a middle initial).
Another issue is the phone number - Most are listed as "555 555 5555", some as not even finished ("555 555"), and some are "5555555555" or "15555555555". Where do I even begin? I have done some Googling and came up short on this specific issue. I am not picky in the language. However, I am most familiar with C# or PHP. I could also probably accomplish it in C++ or BASIC. My question, really, is where to begin. Thanks.
SQL fields: fname, lname, address, city, state, zip, phone(#-###-###-####), email
CSV example: "John M Doe", "156 Blue St", "Nashville", "TN", "23434", "(555) 555-5555", "[email protected]"
CSV example2: "John Doe", "156 Blue St", "Nashville", "TN", "23434", "555 555-5555", "[email protected]"
CSV example3: "John & Jill Doe", "156 Blue St", "Nashville", "TN", "23434", "5555555555", "[email protected]"