* Douglas Nusbaum
> >Referencing your tutorial I created a text file to use with
> >
> >LOAD DATA LOCAL INFILE "../data/pet.txt" INTO TABLE pet;
> >
> >I have tried every possible combination that I could think of of  , \t
> >\\t \, \T etc
> >as delimiters in the data strings such as
> >Fluffy,Harold,cat,f,1993-02-04\N
> >
> >and nothing results in a correct load of the data.  No matter what I do
> >everyting gets loaded into the first field or I get a lot of
> >NULL's or some other version of trash.  Am I just stupid, or is this a
> >bad version of your code or what???
>
> Note that by using  the terms FIELDS TERMINATED BY ...  I got things to
> work.  Bus should
> this be necessary.  Also, it only seems to work on commas, not other
> delimiters

>From the manual:

<manual.txt>
If you don't specify a `FIELDS' clause, the defaults are the same as if
you had written this:

     FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\'
</manual.txt>

This means you don't need to specify anything if your fields are terminated
by tab characters. As your fields are separated by commas, you have to
specify this.

You say it does not work with other delimiters... what delimiters have you
tried, and what was the result?

--
Roger
query


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to