On Wed, 28 Nov 2001, john wrote:
> mysql> load data local infile '/tmp/Parts.txt'
> -> replace
> -> into table Parts
> -> fields
> -> optionally enclosed by '"'
> -> terminated by ','
> -> ('PN','APN','C','Q','D')
> Query OK, 100946 rows affected (39.66 sec)
> Records: 100946 Deleted: 0 Skipped: 0 Warnings: 2
>
> This has only been appended! There has been no update! Effectively, I have
> just doubled the size of my inventory. I could have accomplished that with
> out using REPLACE. I believe the reason for not replacing the data is the
> command does not know how to align itself with CUST_ID = '1'. Does this
> sound correct?
John,
is one of your columns in ('PN','APN','C','Q','D') a unique key? REPLACE
will check for this.
Thomas
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php