Question

i have set of 200 documents (*.doc) containing data as follows . I want to upload it to database (mysql). how to convert it? Is there any easy steps to do? i'm using ubuntu os

 1) Name:           MR RAMESH KUMAR
    Address:        23/64,PANKAJ RESIDENCY
                    HYDERABAD
                    ANDHRA PRADESH
    Residence Tel:  8712455
    Office Tel:     456456  
    E-mail:         ram_iye@ymail.com
Was it helpful?

Solution

I agree with Tisch, but I will provide some details to put you on the right way: You can use a program or do it with the word processor

1.Clear name:

2.replace other column names with , but make sure you take the new line out:

example: replace

\nResidence Tel:  

with

,

3.Use any utility to insert these records to the database, google for csv import to my sql.

OTHER TIPS

I would recommend getting it into a CSV first.

You need to combine the files into one large text file, especially if each document only contains one record. That is going to be the biggest hurdle. Separate fields with commas, and records with linebreaks. Wrap each field in quotation marks. You should have a 200-line file at the end. I suggest using an editor with macro functionality. Be aware of fields that contain commas, and make sure they end up inside the quotation marks.

"MR RAMESH KUMAR", "23/64,PANKAJ RESIDENCY", "HYDERABAD", "ANDHRA PRADESH", "8712455", "456456", "ram_iye@ymail.com"

Next, use your editor to put an INSERT statement on each line

INSERT INTO people p (FullName, Residency, ..., Email) VALUES ("MR RAMESH KUMAR", "23/64,PANKAJ RESIDENCY", "HYDERABAD", "ANDHRA PRADESH", "8712455", "456456", "ram_iye@ymail.com");

Then, run the INSERT statements in your database admin tool. That's it!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top