Forum Moderators: coopster

Message Too Old, No Replies

Easy way to copy MySQL data

         

Sarah Atkinson

4:04 pm on Jul 8, 2005 (gmt 0)

10+ Year Member



I have several enteries in a database that I am currenly entering(my wrist is starting to get sore)

A lot of them are similar with only one or 2 fields different. is there a way to copy them. something like INSERT foo INTO bar LIKE something?

mack

4:09 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Not sure if this is exactly what you want but you can import using various methods within phpmyadmin. If you already have the data as an cvs file for example it may be possible to import the date?

Mack.

Sarah Atkinson

4:17 pm on Jul 8, 2005 (gmt 0)

10+ Year Member



The data I'm wanting to copy is in the table. the new data is on a sheet of paper.
I'll proabbly just end up typing it all in. too bad I can't type extra fast one handed.

Tapolyai

4:24 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am not exactly clear what you are doing.

You have a DB table that you wish to dump onto paper, but some of the fields need to be changed prior printing it on the paper?

If so, is the data change from record to record predictable? i.e. is there other field(s) that can define what these fields should look like? Or is there a specific calculation that can be done to get the final result?

If so, then yes, this can be done.

jatar_k

4:59 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> the new data is on a sheet of paper

then you are going to have to type it in at some point Sarah, unless there is some pattern to the data which you could script.

Sarah Atkinson

5:25 pm on Jul 8, 2005 (gmt 0)

10+ Year Member



I just typed it all in. finished done.

It is an events database. what I was wanting to do was... lets say 67 of the events were Euchre. They took place at the same place but with a differnet time. What I wanted to do was copy one of them 5 times then go in and edit the times with phpmyadmin.

coopster

8:35 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I'll often use a spreadsheet to do this work. It's real easy to setup your data in a spreadsheet and copy rows. Then I use MySQL's command line options to pump data into the file -- or even an interim test file and then INSERT .. SELECT from there.