Does anyone know if I can add a hint SQL_BUFFER_RESULT to INSERT .. SELECT ON
DUPLICATE
ex..
INSERT INTO foo
SELECT SQL_BUFFER_RESULT* FROM bar
ON DUPLICATE KEY UPDATE foo.X=..
Both my tables foo and bar are InnoDB; but the idea is to release the lock on
bar as soon as possible by moving the
On Mon, Jul 21, 2008 at 2:43 PM, mos <[EMAIL PROTECTED]> wrote:
> I thought if MySQL found a duplicate key on the insert, it would
> automatically update the existing row that it found with the results from
> table1 if I left out the column expressions in the update clause. But
> apparently it doe
ace.html
On Mon, Jul 21, 2008 at 11:44 AM, mos
<<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]> wrote:
At 08:23 PM 7/20/2008, Perrin Harkins wrote:
On Sun, Jul 20, 2008 at 12:12 AM, mos
<<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]> wrote:
> Is there a way to get &quo
ote:
>> > Is there a way to get "Insert ... select ... On Duplicate Update" to
>> update
>> > the row with the duplicate key?
>>
>> That's what it does.
>>
>> > Why can't it do this?
>>
>> What makes you think i
At 11:00 AM 7/21/2008, Perrin Harkins wrote:
On Mon, Jul 21, 2008 at 11:44 AM, mos <[EMAIL PROTECTED]> wrote:
> I can't specify all of the columns in a Set statement in the
> OnDuplicate clause because I don't know what the column names are and there
> could be 100 columns.
Write code to d
On Mon, Jul 21, 2008 at 11:44 AM, mos <[EMAIL PROTECTED]> wrote:
> I can't specify all of the columns in a Set statement in the
> OnDuplicate clause because I don't know what the column names are and there
> could be 100 columns.
Write code to do it. There is no way around specifying the co
At 08:23 PM 7/20/2008, Perrin Harkins wrote:
On Sun, Jul 20, 2008 at 12:12 AM, mos <[EMAIL PROTECTED]> wrote:
> Is there a way to get "Insert ... select ... On Duplicate Update" to
update
> the row with the duplicate key?
That's what it does.
> Why can't i
On Sun, Jul 20, 2008 at 12:12 AM, mos <[EMAIL PROTECTED]> wrote:
> Is there a way to get "Insert ... select ... On Duplicate Update" to update
> the row with the duplicate key?
That's what it does.
> Why can't it do this?
What makes you think it can't?
Is there a way to get "Insert ... select ... On Duplicate Update" to
update the row with the duplicate key? Otherwise I'll have to use Replace
which is inefficient because it deletes the old duplicated row and then
inserts the new row with the same key. I'd much rathe
Thanks Shawn, Sergei.
I'll get onto the new version as soon as I can.
Tom.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hi!
On Feb 24, Tom Cunningham wrote:
> It appears you can't combine an insert-select with an on-duplicate-key-update.
You can, since 4.1.10
(and there're some problems with name resolution there, so better wait
for 4.1.11 - search bugdb for details)
Regards,
Sergei
--
__ ___ ___
Tom Cunningham <[EMAIL PROTECTED]> wrote on 02/24/2005 11:31:31 AM:
> It appears you can't combine an insert-select with an
on-duplicate-key-update.
>
> I would find it very useful if you *could* do this. I know it would be
> complicate how you would handle the syntax for what to do when you hit
It appears you can't combine an insert-select with an on-duplicate-key-update.
I would find it very useful if you *could* do this. I know it would be
complicate how you would handle the syntax for what to do when you hit
a duplicate key, could do this: update all the columns that are *not*
involve
13 matches
Mail list logo