At 13:23 -0500 3/24/02, Maribel Piloto wrote:
>Hi all,
>
>I'm new to the list and new to MySQL.  I've been working on creating 
>my first db and I've encountered a problem I'm hoping someone here 
>can help me with.  I have a text file with the following three lines:
>
>V-AIG001|AIGLON'S MUSIC VIDEOS|http://www.aiglon.prv.pl/|\N|
>V-AIG002|AIGLON'S MUSIC VIDEOS|http://www.aiglon.prv.pl/|V-WAR001|
>V-AMA001|AMAR'S  MUSIC VIDS|http://www.angelfire.com/b/BElanna/xms.html|\N|
>
>I have a table called vsites I'm trying to load this data in.  The 
>table looks like this:
>
>+-----------+--------------+------+-----+---------+-------+
>| Field     | Type         | Null | Key | Default | Extra |
>+-----------+--------------+------+-----+---------+-------+
>| vsite_ID  | varchar(10)  |      | PRI |         |       |
>| vsite1    | varchar(100) |      | MUL |         |       |
>| vurl1     | varchar(150) |      |     |         |       |
>| vsite2_ID | varchar(10)  | YES  |     | NULL    |       |
>+-----------+--------------+------+-----+---------+-------+
>
>I'm using this statement to load the data into the table:
>
>LOAD DATA INFILE "vsites.txt" INTO TABLE vsites FIELDS TERMINATED BY '|';
>
>The data is loading fine and the NULL values are in fact correctly 
>entered as NULLs but I'm getting this warning after the LOAD 
>statement:
>
>Records: 3  Deleted: 0  Skipped: 0  Warnings: 3
>
>I don't understand why I'm getting the warnings or what they're about.

Your table contains 4 columns and your data files have 5 columns.
The warnings are problably related to the extra columns, one per each
of your three lines.

If you don't see the extra column, notice that your data lines end
with "|".  That means there's an extra empty column at the end of each
line.  You can test this theory by deleting the "|" at the end of
the lines and loading the file again.

>
>I would appreciate it if anyone could clue me in as to what I may be 
>doing wrong.
>
>MP

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