S.O.S. - MySQL import query

Status
Not open for further replies.

choudang

Padawan
dear digitians,
requesting your valuable help to get it asorted.
Due to SOD, we are not permitted to install any database like orable/sql on our PCs, we are forced to use Access instead of other databases. but i am currently using MYSQL Community server which is not required installtion.
Now, we are getting DB dump in txt format which containts more than 2Lac data. With access, it takes time to run simple queries to get the results... so i will be using mysql.
Now, i need to convert the dump into a new table. i have tried with LOAD FILE but its not happening. I can not create a table to import cuz i won't have any idea about the dump contains
will be gr8 if i will get help for this.
 

rhitwick

Democracy is a myth
Do u want to import the dump to any existing table or want to use the "file" as a table(m not quite clear on this:confused:)
 
OP
choudang

choudang

Padawan
want to use the "file" as a table first....

ps, dump are comma separed, sometimes its become ^/| etc...
 
OP
choudang

choudang

Padawan
wow..... it seems that all are busy with hangouts....

anyway... attaching sample file... is there anyone to type a reply
 

mastermunj

In the zone
Place your text dump file in var/lib/mysql/DB_NAME in linux or program files/mysql/DB_NAME in windows..

DB_NAME = Name of database in which the table exists or will be created for importing data.

LOAD DATA INFILE 'Sample.txt' INTO TABLE
test_table FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY
'"' LINES TERMINATED BY '\n';

I hope this helps... if not, i shall look for other solution too..
 
Status
Not open for further replies.
Top Bottom