Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export flatfile to Mysql db

Status
Not open for further replies.

preethib

Programmer
Jul 20, 2000
39
IN
I need help to export data from a flatfile to Mysql DB.

My Flatfile has about 5000 records, and one record can have any number of lines in the text file.

record1
field1: <value>
field2:<value>
field3:<value>
<value of field4> <value of field5> <value of field6>
field7:<value>
record2
field1: <value>
field2:<value>
field3:<value>
<value of field4> <value of field5> <value of field6>
record3
field1:<value>
field2:<value>
<value of field3> <value of field4> <value of field5> <value of field6>
..

Any suggestions how I can begin with, any URL links/help resources, will be great.

Thanks a lot.



 
Mike,

My file has data fields that needs to be inserted in different tables.
For eg.
If I see &quot;record&quot;, than assuming field1 exist, I need to inset the value of field1 to TableA and than assuming field1 exist, I need to inset the value of field2 to TableB etc...

In this case I guess I can use
&quot; [ESCAPED BY '\\' ]&quot;

to identify fields in my textfile.


-Preethi

Thanks for the information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top