Tab Delim list with CR

Posted on 2006-03-28
Last Modified: 2011-09-20
I am looking for a very simple script that will take files and import them regardless of how many columns they have.  Is this possible?  I need a script that reads data based on the tab delim and carriage return into a MySQL db.  How could I go about this?  Also, as you can see, first two rows to be ignored, since they are just guides.
Sample data:
Admin1_str_code      Country_str_code      Admin1_str_type      Admin1_str_local_type      Admin1_str_name
AA---      AA      (none)      (none)       
AC000      AC      undetermined      undetermined       
AC001      AC      dependency      dependency      Barbuda

Country_str_code      Region_str_code      Country_str_ISO3166_2char_code      Country_str_ISO3166_3Char_code      Country_str_ISO3166_numeric_code      Country_str_type      Country_str_name      Country_str_local_name      Country_str_long_name      Country_str_local_long_name      Country_str_controlling_entity      Country_str_former_name      Country_str_name_abbreviation
AA      CAC      AW      ABW      533      Dependency/Special Sovereignty      Aruba      Aruba      Aruba      Aruba      Netherlands              
AC      CAC      AG      ATG      028      Independent State      Antigua and Barbuda      Antigua and Barbuda      Antigua and Barbuda      Antigua and Barbuda                     
AE      MEa      AE      ARE      784      Independent State      United Arab Emirates      United Arab Emirates      United Arab Emirates      Al Imarat al Arabiyah al Muttahidah             Trucial Oman, Trucial States      UAE

Thanks in advance.
Question by:lamerhooDJV
    LVL 33

    Expert Comment

    LVL 1

    Author Comment

    Sorry, didn't specify, the mysql server in quesiton is fairly older so I don't think that would work :(
    LVL 33

    Accepted Solution

    How old is it?  LOAD DATA INFILE has existed at least as far back as version 3.23.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now