4 messages in com.mysql.lists.win32Re:Why does example not work?
FromSent OnAttachments
Danny Kohn17 Sep 2001 11:03 
Heikki Tuuri17 Sep 2001 13:08 
Paul DuBois17 Sep 2001 13:41 
Danny Kohn17 Sep 2001 14:50.txt
Subject:Re:Why does example not work?
From:Heikki Tuuri (Heik@innobase.inet.fi)
Date:09/17/2001 01:08:38 PM
List:com.mysql.lists.win32

Danny,

you probably have control characters or special characters in your text file. They scramble the output of mysql.exe in your select *.

Regards,

Heikki http://www.innodb.com

Hi. Newbee trying to learn MySQL.

On page 167 in the manual there is an example file that should be loaded into the newly created file event.

The table is: +--------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+--------------+------+-----+---------+-------+ | name | varchar(20) | YES | | NULL | | | date | date | YES | | NULL | | | type | varchar(15) | YES | | NULL | | | remark | varchar(255) | YES | | NULL | | +--------+--------------+------+-----+---------+-------+

The file to import is: Fluffy 1995-05-15 litter 4 kittens, 3 female, 1 male Buffy 1993-06-23 litter 5 puppies, 2 female, 3 male Buffy 1994-06-19 litter 3 puppies, 3 female Chirpy 1999-03-21 vet needed beak straightened Slim 1997-08-03 vet broken rib Bowser 1991-10-12 kennel \N Fang 1991-10-12 kennel \N Fang 1998-08-28 birthday Gave him a new chew toy Claws 1998-03-17 birthday Gave him a new flea collar Whistler 1998-12-09 birthday First birthday

The command to import is

LOAD DATA LOCAL INFILE "d:/Program/MySQL/data/menagerie/event.txt" INTO TABLE event;

But select * from event; gives the following very strange result: +----------+------------+----------+------------------------------+ | name | date | type | remark | +----------+------------+----------+------------------------------+ |Fluffy | 1995-05-15 | litter | 4 kittens, 3 female, 1 male |Buffy | 1993-06-23 | litter | 5 puppies, 2 female, 3 male | | 1994-06-19 | litter | 3 puppies, 3 female |rpy | 1999-03-21 | vet | needed beak straightened |8-03 | vet | broken rib |nnel | N |nnel | N | | 1998-08-28 | birthday | Gave him a new chew toy |laws | 1998-03-17 | birthday | Gave him a new flea collar | Whistler | 1998-12-09 | birthday | First birthday | +----------+------------+----------+------------------------------+

Anyone that can explain why this is happening?

Hälsningar / Regards (\ /) )) Danny Kohn Tel: +46 (0)708 140 300 =('.')=// Miau! Systematik Consulting AB ICQ: 1328817 ( ~~~ )/ Rrrrrui! http://www.systematik.se HAM: SM0NBJ `w---w´

---------------------------------------------------------------------------

-----