Import MySQL data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eclipsme

    #1

    Import MySQL data

    I have a delimited text file I need to get into a MySQL table. My main
    problem is the date field. It is in the format of 10/28/2008. The table
    needs 2008-10-28.

    My first thought was to build an sql query that can be pasted into
    MyPHPadmin to directly update the table. I can do this, except for the date.

    What would be the easiest way of doing this? Should I write a php script
    for this? I thought going through PHPadmin would be easiest, but I am
    not so sure now.

    Thanks for any suggestions,
    Harvey
  • 703designs

    #2
    Re: Import MySQL data

    On Nov 11, 4:30 pm, eclipsme <eclip...@nowhe re.comwrote:
    I have a delimited text file I need to get into a MySQL table. My main
    problem is the date field. It is in the format of 10/28/2008. The table
    needs 2008-10-28.
    >
    My first thought was to build an sql query that can be pasted into
    MyPHPadmin to directly update the table. I can do this, except for the date.
    >
    What would be the easiest way of doing this? Should I write a php script
    for this? I thought going through PHPadmin would be easiest, but I am
    not so sure now.
    >
    Thanks for any suggestions,
    Harvey
    I can show you how to do this (replace all date "/" with "-" in the
    file) in Python if interested. Do you have Python installed?

    Thanks,
    Thomas

    Comment

    • eclipsme

      #3
      Re: Import MySQL data

      703designs wrote:
      On Nov 11, 4:30 pm, eclipsme <eclip...@nowhe re.comwrote:
      >I have a delimited text file I need to get into a MySQL table. My main
      >problem is the date field. It is in the format of 10/28/2008. The table
      >needs 2008-10-28.
      >>
      >My first thought was to build an sql query that can be pasted into
      >MyPHPadmin to directly update the table. I can do this, except for the date.
      >>
      >What would be the easiest way of doing this? Should I write a php script
      >for this? I thought going through PHPadmin would be easiest, but I am
      >not so sure now.
      >>
      >Thanks for any suggestions,
      >Harvey
      >
      I can show you how to do this (replace all date "/" with "-" in the
      file) in Python if interested. Do you have Python installed?
      >
      Thanks,
      Thomas
      Hi Thomas. No idea, but thanks for the offer. I was freaking out a bit.
      Turns out the database was smaller than I thought. I went through and
      manually changed them. There. Done!

      Thanks,
      Harvey

      Comment

      Working...