Pallavi,
[Please keep replies on-list. It helps other people, my mail rules keep you
separated from paying clients, and the list archives are complete]

> actually i created a new file by vim & then did cut & paste .

=therein lies the problem. If you compare the listing below with the
expected output (MySQL manual, Chapter 3, Tutorial) you will note problems.
The most obvious are the null entries - don't cut-and-paste happily.

=I assume that you're using *nix (per "vim"). If not, be concerned about
line separator/terminators. (see command options)

=Regardless, and as an experiment, why don't you download the sample files
from MySQL and try running those against this command. That would
immediately highlight/illustrate any file format errors by offering the
opportunity to compare data files; or would confirm that some change in the
way LOAD DATA is now (more securely) implemented has 'broken' the sample
code.

=when you've had a 'play', come back and let us know how much things are
improved,
=dn


> On Wed, 20 Nov 2002 DL Neil wrote :
> >Pallavi,
> >
> > > mysql> load data infile "pet.txt" into table pet;
> > > ERROR 1105: File './test/pet.txt' not found (Errcode: 2)
> > > mysql> load data infile "pet.txt" into table pet;
> > > Query OK, 8 rows affected (0.00 sec)
> > > Records: 8  Deleted: 0  Skipped: 0  Warnings: 4
> > >
> > > mysql> select * from pet;
> > >
> >+--------------+--------+---------+------+------------+------------+
> > > | name         | owner  | species | sex  | birth      |
> >death
> > > |
> > >
> >+--------------+--------+---------+------+------------+------------+
> > > | Fluffy       | Harold | cat     | f    | 1993-02-04 | NULL
> > > |
> > > | Claws        | Gwen   | cat     | m    | 1994-03-17 | NULL
> > > |
> > > | Buffy        | Harold | dog     | f    | 1989-05-13 | NULL
> > > |
> > > | Fang         | Benny  | dog     | m    | 1990-08-27 | NULL
> > > |
> > > | Bowser       | Diane  | dog     | m    | 1998-08-31 |
> >1995-07-29
> > > |
> > > | Chirpy  Gwen | bird   | f       | 1    | 0000-00-00 | NULL
> > > |
> > > | Whistler     | Gwen   | bird    | 1    | NULL       | NULL
> > > |
> > > | Slim         | Benny  | snake   | m    | 1996-04-29 | NULL
> > > |
> > >
> >+--------------+--------+---------+------+------------+------------+
> > > 8 rows in set (0.00 sec)
> > >
> > > but what for but what for 4 warnings?
> > > does it for some internal reason?
> >
> >Compare your answer against the tutorial provided: 3.3.3 Loading
> >Data into a
> >Table. Note the differences! Now you see the reason(s) for
> >warnings. Please
> >check your input data.
> >
> >Did you download the sample data files, create your own, or
> >attempt a
> >cut-and-paste. May I recommend the former.
> >
> >Regards,
> >=dn


---------------------------------------------------------------------
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