LOAD DATA LOCAL INFILE '/path/myfile.txt'
INTO TABLE mytable
FIELDS TERMINATED BY '|';

If the text values are enclosed by double quotation
marks, you need to remove the semicolon in line 3 and
add:

ENCLOSED BY "\"";

If your myfile.txt was created in Windows, you *may*
need to remove the semicolon in line 3 and add:

LINES TERMINATED BY "\r\n";

Good luck,

Andrew Gould

--- Marcus Ouimet <[EMAIL PROTECTED]> wrote:
> I am still very new to MySQL, I am trying to convert
> a flat line database to
> MySQL (Database uses | as a deliminator). I have
> found what I need in the
> documentation to do this yet I am a bit stuck. Could
> someone be so kind to
> give me an example of  (mysql> LOAD DATA LOCAL
> INFILE "myfile.txt" INTO
> TABLE mytable;) with  | instead of a tab
> deliminator. My database looks
> similiar to:
> 
> field1|field2|field3
> field1|field2|field3
> field1|field2|field3
> field1|field2|field3
> 
> etc..


__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

-- 
---------------------------------------------------------------------
Please check "http://www.mysql.com/documentation/manual.php" before
posting. To request this thread, e-mail [EMAIL PROTECTED]

To unsubscribe, send a message to:
    <[EMAIL PROTECTED]>

If you have a broken mail client that cannot send a message to
the above address (Microsoft Outlook), you can use:
    http://lists.mysql.com/php/unsubscribe.php

Reply via email to