Don't know?

5.0.22-community-nt-log
Win XP Pro
InnoDB

Jesse
----- Original Message ----- 
  From: sol beach 
  To: Jesse 
  Sent: Monday, April 02, 2007 4:22 PM
  Subject: Re: UPDATE / not UPDATE??


  Might this behavior be version dependent; which you neglected to provide.
  Same for OS name & version; plus underlying storage engine type?

   
  On 4/2/07, Jesse <[EMAIL PROTECTED]> wrote: 
    When I run the query:

    UPDATE InvHead I
      JOIN (SELECT InvNo,Sum(Rate + CASE WHEN AttendingAcademy=1 THEN 30 ELSE 0 
    END) AS InvTot
         FROM Participants P GROUP BY InvNo) AS PartSum ON
    PartSum.InvNo=I.InvNo
    SET I.Total=PartSum.InvTot
    WHERE (I.InvoiceType='CL' OR I.InvoiceType='CSS') AND I.RegFinishedDate IS
    NOT NULL

    It initially updates several rows.  However, when I run it again, it updates
    no rows at all.  If I then go in and manually change the Total to an
    incorrect value, then run it again, it updates that one row.  Does MySQL 
    check a value before updating it, and if it is the same as the value that
    it's updating it with, it doesn't bother updating it again?

    Thanks,
    Jesse


    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to