Re: On Duplicate Key Update question

2007-01-06 Thread ViSolve DB Team
Reed" <[EMAIL PROTECTED]> To: Sent: Saturday, January 06, 2007 4:10 AM Subject: On Duplicate Key Update question I use On Duplicate Key Update a lot and I usually use it like this, Insert Into tablename (myID, Qty) Values (1034,15), (6,13), (5001,1), (145,20) On Duplicate Key Updat

Re: On Duplicate Key Update question

2007-01-05 Thread Chris W
Ed Reed wrote: I use On Duplicate Key Update a lot and I usually use it like this, Insert Into tablename (myID, Qty) Values (1034,15), (6,13), (5001,1), (145,20) On Duplicate Key Update Qty=Values(Qty); This works very well but now I'd like to do something a little different. I'd like to have

Re: On Duplicate Key Update question

2007-01-05 Thread Ed Reed
Sorry for the premature question. I think I figured it out. On Duplicate Key Update Qty=Qty+Values(Qty); I haven't tested it yet but it makes sense that it'll work. >>> "Ed Reed" <[EMAIL PROTECTED]> 1/5/07 2:40 PM >>> I use On Duplicate Key Update a lot and I usually use it like this, Inser

On Duplicate Key Update question

2007-01-05 Thread Ed Reed
I use On Duplicate Key Update a lot and I usually use it like this, Insert Into tablename (myID, Qty) Values (1034,15), (6,13), (5001,1), (145,20) On Duplicate Key Update Qty=Values(Qty); This works very well but now I'd like to do something a little different. I'd like to have a query like this