Hi.

You may use lines starting by '\t' to ignore first column (if your outfile has default 
format).



For example:



select * from t4;

+------+------+------+------+

| a    | b    | c    | d    |

+------+------+------+------+

|    1 |    2 |    3 |    4 |

|    2 |    6 |    7 |    4 |

|    3 |   10 |   11 |   20 |

+------+------+------+------+



select * from t4 into outfile 't4.txt';



cat t4.txt



1       2       3       4

2       6       7       4

3       10      11      20



load data infile 't4.txt' into table t3 lines starting by '\t';



select * from t3;

+------+------+------+

| b    | c    | d    |

+------+------+------+

|    2 |    3 |    4 |

|    6 |    7 |    4 |

|   10 |   11 |   20 |

+------+------+------+







Dan Stark <[EMAIL PROTECTED]> wrote:

> I've checked through the archives a documentation but cannot find an

> answer to my problem. I'm attempting to load data from a text file

> that has a column that is not present in my database table.

> 

> Table

> B C D

> 

> File

> A B C D

> 

> I've been trying to find a way to ignore the first column of the text

> file by specifiing columns like:

> (Null,B,C,D) or ('',B,C,D) but mysql doesn't understand these

> commands. Is there a way to ignore columns with load data?

> 

> TIA

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to