RE: Update record count

2010-09-17 Thread Jerry Schwartz
>-Original Message- >From: Shawn Green (MySQL) [mailto:shawn.l.gr...@oracle.com] >Sent: Thursday, September 16, 2010 9:51 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Update record count > >On 9/16/2010 5:12 PM, Jerry Schwartz wrote: >> I

Re: Update record count

2010-09-17 Thread Johan De Meersman
On Fri, Sep 17, 2010 at 3:51 AM, Shawn Green (MySQL) < shawn.l.gr...@oracle.com> wrote: > > So if 10 rows of A match your conditions, 1 row from B match your > conditions, and 10 rows from C match your conditions, then this query > produces 10*1*10 total row combinations. > Umm. It's friday, so I

Re: Update record count

2010-09-16 Thread Shawn Green (MySQL)
On 9/16/2010 5:12 PM, Jerry Schwartz wrote: I should be able to figure this out, but I'm puzzled. Here's a simplified example: UPDATE a JOIN b ON a.kb = b.kb JOIN c ON b.kc = c.kc SET a.f1 = NOW(), b.f2 = NOW() WHERE c.f3 IN ('x', 'y', 'z') AND b.f4 = 'yen'; It seems to me that if there are

Update record count

2010-09-16 Thread Jerry Schwartz
I should be able to figure this out, but I'm puzzled. Here's a simplified example: UPDATE a JOIN b ON a.kb = b.kb JOIN c ON b.kc = c.kc SET a.f1 = NOW(), b.f2 = NOW() WHERE c.f3 IN ('x', 'y', 'z') AND b.f4 = 'yen'; It seems to me that if there are 3 rows found in `c` that match a total of 10