MySQL Forums
Forum List  »  General

Re: Problem with LOAD DATA of selected fields from input record
Posted by: Peter Halliday
Date: January 12, 2005 05:22PM

Well when you look at the command you give and what help load data says, the (a, b) that you gave it don't mean anything, because it doesn't know what the names of the fields are. You are telling it call the first column a and the second column b. So there's a way to do what you are looking for with the LOAD DATA statement. It would be much faster to do it through SQL as suggested before unless you want to get rid of the column yourself. If you are on Unix system you can do `cat file_name|cut --delimiter=',' -f 1,3 > new_file_name` and that should get rid of the 2nd column for you and put the results in a new file. This way you still have both files. Obviously Change the comma to the delimiter you have and the -f specify which row you want. If you have windows good luck.

Peter

Options: ReplyQuote


Subject
Written By
Posted
Re: Problem with LOAD DATA of selected fields from input record
January 12, 2005 05:22PM


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.