MySQL Forums
Forum List  »  Newbie

Re: LOAD DATA INFILE and Skipping Columns?
Posted by: Lachlan Mulcahy
Date: May 09, 2005 06:40AM

Hi there,

> Is there no possibility to specify which intermediate columns the command LOAD DATA INFILE should skip.

You are correct, there is currently no way to do this -- You may wish to log a feature request at http://bugs.mysql.com

The options you have are to rewrite the file without the unneeded fields, insert into a temp table and then build the real table from there, or create an import script that reads only the required fields from the INFILE and uses INSERTs to write to the server. The downside of the last option is that INSERTs being SQL statements take time to parse and as such are much slower than the more direct mechanism used by LOAD DATA.

Kind Regards,

Lachlan Mulcahy, Melbourne, Australia
MySQL AB, www.mysql.com
Are you MySQL certified? www.mysql.com/certification

Options: ReplyQuote


Subject
Written By
Posted
Re: LOAD DATA INFILE and Skipping Columns?
May 09, 2005 06:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.