List:General Discussion« Previous MessageNext Message »
From:Chris W Date:March 2 2010 5:35pm
Subject:Re: redirecting query output?
View as plain text  
I'm not sure this is the best solution, but whenever I am inserting a 
lot of records with the possibility of some of those records already 
existing and I have no reason to update the existing records with new 
data, I use 'INSERT IGNORE'.  I'm not sure if that will 'ignore' other 
errors that you may want to show.  I would read up about it here....

Richard Reina wrote:
> I have a perl script that periodically reads and enters (via perl->DBI parsed
> system output (about received faxes) into a table.  Since the old output is repeated I
> have put, when creating the table, the UNIQUE key on the field of the faxname, which is
> always different (something like fax000007879.tif) 
> Every time the script is run many of the old faxes that have already been entered
> into the table are still on the server (as I would like them to be).  As a result MySQL
> via execute() dutifully warns about all the duplicate errors. Is there anyway to redirect
> that output so the it does not appear as standard output? Or is it a bad idea to do so and
> should I being doing a different sort ow query altogether?
> Thanks,
> Richard
redirecting query output?Richard Reina2 Mar
  • Re: redirecting query output?Olaf Stein2 Mar
  • Re: redirecting query output?Chris W2 Mar