Or, Load the data into a temp , and create necessary index on the required columns, Write a stored proc to update columns in the original table with values from the temp table based on key columns joins between both tables
regards anandkl On 6/28/07, mos <[EMAIL PROTECTED]> wrote:
At 01:08 PM 6/27/2007, you wrote: >Hi, > > > >I have a question on LOAD DATA INFILE command. > >I have a table with 10 columns. Is it possible to update only few >columns of this table using LOAD DATA INFILE? No. As you found out Load Data loads the specified columns and sets the other columns to NULL. The only way around this is to write the current column values that you want to save back out to the text file. Or load the data into a second temporary table with just the columns you need, and then do an Update to the original table (assuming of course all of the data in the text file are updates and not new rows otherwise you'll then have to join the original table with the temp table to find the new rows then add those to the original table.) Whew! Mike (If programming was easy, everyone would be doing it.) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]