Atle Veka wrote:
There is no option to do this to my knowledge. However, this would be a
quick workaround:
- TRUNCATE TABLE <table>; # clears table completely, akin to doing
DROP/CREATE TABLE
- INSERT INTO <table> SELECT .. FROM ..;
Again, you missed the critical part. I'm trying to replace a FILE, not a
TABLE. Perhaps a better Subject should have been 'How to overwrite
existing file with SELECT .. INTO OUTFILE'.
I think I'll end up writing a Perl script to do this.
On Mon, 16 Apr 2007, Amer Neely wrote:
At 08:14 AM 4/13/2007, Amer Neely wrote:
I'm using MySQL 5.0.21 and am trying to find out if it is possible to overwrite
an existing file when using a 'SELECT ... INTO' command from the command line.
Is there another parameter that can do this? I've looked through the online
reference manual, but found no specific help there.
--
Amer Neely
Amer,
Why can't you do:
drop table if exists mynewtable;select .. into mynewtable
Mike
:) Thanks, but you missed the part about '.. an existing file..'. I'm
hoping there is an option for the SELECT INTO to do this. I'm doing some
extensive testing and it's getting tiresome having to delete a file each
time I run the test.
--
Amer Neely
w: www.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"We make web sites work!"
--
Amer Neely
w: www.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"We make web sites work!"
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]